Fiestel cipher
Humus4. Have a function with the name "feistel_enc" that accepts up to 16 bytes long byte-sequence as its first argument, an integer (specifying the number of rounds) as its second argument, and an integer (specifying the seed value for the key generation) as its third argument and returns a 16 bytes long encrypted byte-sequence. e.g., function call: feistel_enc(b'isthis16bytes?',16,50) should return a byte-sequence b'}\xd9\x93-G\x8e\xaa5\x95\x84\n\xb7q\xc4>\xb6'
5. Have a function with the name "feistel_dec" that accepts up to 16 bytes long byte-sequence as its first argument, an integer (specifying the number of rounds) as its second argument, and an integer (specifying the seed value for the key generation) as its third argument and returns a 16 bytes long decrypted byte-sequence. e.g., function call: feistel_dec(b'}\xd9\x93-G\x8e\xaa5\x95\x84\n\xb7q\xc4>\xb6',16,50) should return a byte-sequence b'isthis16bytes? ' or b'isthis16bytes?\x20\x20'
6. Write your own test code (if any) in the "__main__" if block and not outside the functions.
- 3 years ago
- 10
- ECO 205 Week 2 Appendix C Supply and Demand
- Many people do not “like” or “trust” single point estimates for things they need measured
- NURS 4010 WK 4 PRACTICUM
- Contract Law
- Strategic Initiative Paper
- One Page Needed
- need help to write essay .. English
- Business meeting communication
- How has the demand of luxury and necessary goods changed over the past 5 years? In your opinion, why has ...
- The managers at Reynolds Inc., a manufacturer of industrial scales and laboratory equipment, want to investigate the relationship between length of employment of their salespeople and the number of electronic laboratory scales sold.