Cryptography Tricks: Difference between revisions
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
* If cbc is used on a block and if the attacker knows where 16 bytes of zeroes are located in known plaintext with given ciphertext location, he can use AES-ECB with the guessed key on that location. if there is a match of the previous 16 bytes as result, the attacker automatically knows the guessed key is the correct key | * If cbc is used on a block and if the attacker knows where 16 bytes of zeroes are located in known plaintext with given ciphertext location, he can use AES-ECB with the guessed key on that location. if there is a match of the previous 16 bytes as result, the attacker automatically knows the guessed key is the correct key | ||
* this means that the first 0x10 bytes of the ciphered text will be equal to the second 0x10 bytes of the plaintext, if the plaintext is supposed to have zeroes. | |||
{{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude> | {{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude> |
Revision as of 01:02, 20 August 2021
Here are some cryptography tricks that i've learned with some important people and that helped made this page. They helped a lot with the Keys and Seeds page construction. Use them wisely :)
AES-CTR tricks
- Recovery of partial plaintext with two ciphertexts encrypted with same key and iv by knowing where zeroes (\x00) are located
- This trick was used in the recovery of the ebootrom keys
- Xoring these ciphertexts will reveal plaintext where in both locations there are zeroes in one place and plaintext in the other
AES-CBC tricks
- The iv of a CBC operation is always the previous 0x10 block, UNLESS it's the starting operation. in this case it is specified by the end-user
AES-ECB tricks
- If cbc is used on a block and if the attacker knows where 16 bytes of zeroes are located in known plaintext with given ciphertext location, he can use AES-ECB with the guessed key on that location. if there is a match of the previous 16 bytes as result, the attacker automatically knows the guessed key is the correct key
- this means that the first 0x10 bytes of the ciphered text will be equal to the second 0x10 bytes of the plaintext, if the plaintext is supposed to have zeroes.