Last active
October 3, 2017 19:57
-
-
Save yigityus/de1f4c89d91b2627e87f5e8d9ae10e2c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import binascii | |
| import hashlib | |
| import base64 | |
| from pyDes import * | |
| data = '000000000000000000000000000000' | |
| #key = '48C3B4286FF421A4A328E68AD9E542A4' | |
| key = 'E6F1081FEA4C402CC192B65DE367EC3E' | |
| key = binascii.unhexlify(key) | |
| data= binascii.unhexlify(data) | |
| print('key: ' + str(key)) | |
| k = triple_des(key, ECB, "\0\0\0\0\0\0\0\0", pad=None, padmode=PAD_PKCS5) | |
| d = k.encrypt(data) | |
| print('KCV: ' + str(binascii.hexlify(d)[0:8])) | |
| print(hex(0x12ef ^ 0xabcd)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment