Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report: AES-CTR does not appear to work correctly in CyberChef when the algorithm counter rollover occurs. #1799

Open
CreativeGenious opened this issue Apr 17, 2024 · 0 comments
Labels

Comments

@CreativeGenious
Copy link

Describe the bug
When attempting to rollover the counter for AES in CTR mode, the CyberChef output is different from Open-SSL and Crypto++.

To Reproduce
Steps to reproduce the behaviour or a link to the recipe / input used to cause the bug:

In CyberChef, set up for AES Encrypt: https://gchq.github.io/CyberChef/#recipe=AES_Encrypt(%7B'option':'Hex','string':'000102030405060708090a0b0c0d0e0f'%7D,%7B'option':'Hex','string':'ffffffffffffffffffffffffffffffff'%7D,'CTR','Hex','Hex',%7B'option':'Hex','string':''%7D)&input=ODg5OWFhYmJjY2RkZWVmZjAwMTEyMjMzNDQ1NTY2NzdmZQ

Use the following inputs:
Key (128-bit): 000102030405060708090a0b0c0d0e0f
IV (128-bit): ffffffffffffffffffffffffffffffff
Plain Text: 8899aabbccddeeff0011223344556677fe

CyberChef result: b4ddb58902da6cdc64c680aa4a05dd6401

Expected behaviour
I expected the Crypto++/Open-SSL result in CyberChef: B4DDB58902DA6CDC64C680AA4A05DD6438

Screenshots
image

Desktop (if relevant, please complete the following information):

  • OS: Windows 11
  • Browser: Microsoft Edge, Version 123.0.2420.97 (Official build) (64-bit)
  • CyberChef version: 10.17.0

Additional context
This was tested against two other models (one for a HW implementation). Both models agree with Crypto++ and Open-SSL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant