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: DES Decrypt/Encrypt not wokring with 24 bytes key #1843

Open
Sabadon opened this issue Jun 18, 2024 · 1 comment · May be fixed by #1904
Open

Bug report: DES Decrypt/Encrypt not wokring with 24 bytes key #1843

Sabadon opened this issue Jun 18, 2024 · 1 comment · May be fixed by #1904
Labels

Comments

@Sabadon
Copy link

Sabadon commented Jun 18, 2024

Describe the bug
Trying to use a triple-length key I get the error:
Invalid key length: 24 bytes

DES uses a key length of 8 bytes (64 bits).
Triple DES uses a key length of 24 bytes (192 bits).

To Reproduce
Link to recipe

Expected behaviour
No error, and an attempt to decrypt/encrypt the input

Additional context
I looked at the code and it only checks for length 8 bytes

if (key.length !== 8) {
            throw new OperationError(`Invalid key length: ${key.length} bytes

DES uses a key length of 8 bytes (64 bits).
Triple DES uses a key length of 24 bytes (192 bits).`);
}
@Sabadon Sabadon added the bug label Jun 18, 2024
@Sabadon
Copy link
Author

Sabadon commented Jun 18, 2024

I found a recipe for Triple DES Decrypt, then in DES Decrypt you need to at least change the error message, which is misleading.

FranciscoPombal added a commit to FranciscoPombal/CyberChef that referenced this issue Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant