암호학 (Cryptology)/code
[Python3] 블록 암호 및 스트림 암호 (차분 공격 - DDT 구현)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 # Difference distribution table, ddt 출력 def p(): print("") print("-"*52) def pr(): print("-"*52) print("") ddt = [[0 for col in range(16)] for row in range(16)] s_box = [ 14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7 ..