diff --git a/unit05_key_exchange/src/e_01.py b/unit05_key_exchange/src/e_01.py index 65afc9d..c9e2d5d 100644 --- a/unit05_key_exchange/src/e_01.py +++ b/unit05_key_exchange/src/e_01.py @@ -34,8 +34,8 @@ rnd = random.randint(1,2**128) keyB= hashlib.md5(str(rnd)).digest() -print 'Long-term Key Alice=',binascii.hexlify(keyA) -print 'Long-term Key Bob=',binascii.hexlify(keyB) +print ('Long-term Key Alice=',binascii.hexlify(keyA)) +print ('Long-term Key Bob=',binascii.hexlify(keyB)) rnd = random.randint(1,2**128) keySession= hashlib.md5(str(rnd)).hexdigest() @@ -43,11 +43,11 @@ keySession= hashlib.md5(str(rnd)).hexdigest() ya = encrypt(keySession,keyA,AES.MODE_ECB) yb = encrypt(keySession,keyB,AES.MODE_ECB) -print "Encrypted key sent to Alice:",binascii.hexlify(ya) -print "Encrypted key sent to Bob:",binascii.hexlify(yb) +print ("Encrypted key sent to Alice:",binascii.hexlify(ya)) +print ("Encrypted key sent to Bob:",binascii.hexlify(yb)) decipherA = decrypt(ya,keyA,AES.MODE_ECB) decipherB = decrypt(yb,keyB,AES.MODE_ECB) -print "Session key:",decipherA -print "Session key:",decipherB +print ("Session key:",decipherA) +print ("Session key:",decipherB)