{ "cells": [ { "cell_type": "code", "id": "initial_id", "metadata": { "collapsed": true, "ExecuteTime": { "end_time": "2024-08-11T22:25:25.992246Z", "start_time": "2024-08-11T22:25:25.829841Z" } }, "source": "from src.models import SubstitutionKey\n", "outputs": [], "execution_count": 1 }, { "metadata": { "ExecuteTime": { "end_time": "2024-08-11T22:25:26.228563Z", "start_time": "2024-08-11T22:25:25.993216Z" } }, "cell_type": "code", "source": [ "width = 70\n", "height = 100\n", "s1 = SubstitutionKey.init_matrix(width, height)\n", "s2 = SubstitutionKey.init_matrix(width, height)\n", "s3 = SubstitutionKey.init_matrix(width, height)\n", "\n", "c1 = SubstitutionKey.init_matrix(width, height)\n", "c2 = SubstitutionKey.init_matrix(width, height)\n", "c3 = SubstitutionKey.init_matrix(width, height)\n", "\n", "m1 = SubstitutionKey.init_matrix(width, height)\n", "m2 = SubstitutionKey.init_matrix(width, height)\n", "m3 = SubstitutionKey.init_matrix(width, height)\n", "m4 = SubstitutionKey.init_matrix(width, height)\n", "m5 = SubstitutionKey.init_matrix(width, height)\n", "\n", "s_m1 = s1 ^ m4\n", "c_m1 = c1 ^ m4\n", "s_m4 = s1 ^ m5\n", "c_m4 = c1 ^ m5\n", "\n", "m_c1 = SubstitutionKey.init_matrix(width, height)\n", "m_s1 = SubstitutionKey.init_matrix(width, height) \n", "\n", "m_s2 = m1 ^ m_c1\n", "m_c2 = m1 ^ m_s1\n", "\n", "s_m3 = m_s2 ^ s2 ^ m3\n", "s_m2 = m1 ^ s2 ^ m2 ^ m_s1\n", "c_m2 = m_c2 ^ c2 ^ m2\n", "c_m3 = m1 ^ m_c1 ^ c2 ^ m3\n" ], "id": "58883d386ec57cc4", "outputs": [], "execution_count": 2 }, { "metadata": {}, "cell_type": "code", "outputs": [], "execution_count": null, "source": "", "id": "2e1b925a48925228" } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 5 }