add comments on possible improvements

pull/3628/head
Your Name 1 year ago
parent dbe99851ec
commit 2b80abde6d

@ -359,6 +359,7 @@ KERNEL_FQ void m26610_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sh
u32 pt[4] = { 0 }; u32 pt[4] = { 0 };
// we try to decrypt the ciphertext // we try to decrypt the ciphertext
// TODO this can be moved to a separate decryption function in inc_cipher_aes-gcm.cl
AES_GCM_inc32(J0); // the first ctr is used to compute the tag, only the second is used for decryption: https://en.wikipedia.org/wiki/Galois/Counter_Mode#/media/File:GCM-Galois_Counter_Mode_with_IV.svg AES_GCM_inc32(J0); // the first ctr is used to compute the tag, only the second is used for decryption: https://en.wikipedia.org/wiki/Galois/Counter_Mode#/media/File:GCM-Galois_Counter_Mode_with_IV.svg
AES_GCM_GCTR (key, J0, ct, 16, pt, s_te0, s_te1, s_te2, s_te3, s_te4); // decrypt the ciphertext AES_GCM_GCTR (key, J0, ct, 16, pt, s_te0, s_te1, s_te2, s_te3, s_te4); // decrypt the ciphertext

@ -27,7 +27,11 @@ def metamask_parser(file, shortdata):
if((len(j['data']) > 3000) or shortdata): if((len(j['data']) > 3000) or shortdata):
print("! Data too long, we limit it to 64 bytes, this hash can only be used with m26610!") print("! Data too long, we limit it to 64 bytes, this hash can only be used with m26610!")
data_bin = base64.b64decode(j['data']) data_bin = base64.b64decode(j['data'])
# TODO limit data to 16 bytes, we only check the first block of data, so we don't need more data.
# The use of smaller buffers should speedup the attack.
# Still the pbkdf 10k iter will be taking the most time by far probably.
j['data'] = base64.b64encode(data_bin[0:64]).decode("ascii") j['data'] = base64.b64encode(data_bin[0:64]).decode("ascii")
print('$metamask-short$' + j['salt'] + '$' + j['iv'] + '$' + j['data']) print('$metamask-short$' + j['salt'] + '$' + j['iv'] + '$' + j['data'])
else: else:
print('$metamask$' + j['salt'] + '$' + j['iv'] + '$' + j['data']) print('$metamask$' + j['salt'] + '$' + j['iv'] + '$' + j['data'])

Loading…
Cancel
Save