Skip to content
Snippets Groups Projects
Commit 87166d8a authored by dario.genga's avatar dario.genga
Browse files

Add methods to implements

parent 395d00ef
Branches
No related tags found
No related merge requests found
......@@ -5,7 +5,54 @@ Date : 2022
"""
def add_mod(a, b):
pass
def mul_mod(a, b):
pass
def xor(a, b):
pass
def modulo(a, b):
# euclide
pass
def create_key_tables():
pass
def round():
# 1. Multiply X1 and the first subkey Z1
# 2. Add X2 and the second subkey Z2
# 3. Add X3 and the third subkey Z3
# 4. Multiply X4 and the fourth subkey Z4
# Don't do the next steps if this is the final round
# 5. Bitwise XOR the results of steps 1 and 3
# 6. Bitwise XOR the results of steps 2 and 4
# 7. Multiply the result of step 5 and the fifth subkey Z5
# 8. Add the results of step 6 and 7
# 9. Multiply the result of step 8 and the sisth subkey Z6
# 10. Add the results of steps 7 and 9
# 11. Bitwise XOR the results of steps 1 and 9
# 12. Bitwise XOR the results of steps 3 and 9
# 13. Bitwise XOR the results of steps 2 and 10
# 14. Bitwise XOR the results of steps 4 and 10
pass
def main():
plaintext = 1001110010101100
key = 11011100011011110011111101011001
expected_ciphertext = 1011101101001011
print("hello world")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment