Hello! could someone help me with this problem? Thank you! :) Programming Language: PYTHON Given plaintext (gold_plainte

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Hello! could someone help me with this problem? Thank you! :) Programming Language: PYTHON Given plaintext (gold_plainte

Post by answerhappygod »

Hello! could someone help me with this problem? Thank you!
:)
Programming Language: PYTHON
Given plaintext (gold_plaintext.in) : "This is an
example input file created specifically for the third mandatory
assignment in INF143A. If you are reading this, I wish you a great
Easter vacation, and good luck on the assignment!"
Consider a very simple block cipher implemented using the Gold
function x3 on 32 bits: if the 32-bit plaintext is
P and the 32-bit key is K, then the ciphertext is K3 ⊕ P, where K3
is computed in the finite field with primitive polynomial
x32 + x15 + x9 +
x7 + x4 + x3 + 1,
and ⊕ denotes the XOR operation. An implementation of this cipher
is available in python file "gold.py". Write an extension of this
block cipher that can be used on an input of arbitrary length, i.e.
not only 32 bits. If the input is not a multiple of 32, pad it with
0’s on the right. Implement the following modes of operation:
• ECB;
• CBC;
• OFB.
Encrypt the plaintext given in gold plaintext.in using each of
the three modes of operation. Use K = 0101 . . . 01 (32 alternating
zeros and ones) as the key.
Block.py file:
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply