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 encryption bug if incoming byte >= 0x80 #210

Closed
ComingNine opened this issue Dec 7, 2017 · 3 comments
Closed

Bug report: aes encryption bug if incoming byte >= 0x80 #210

ComingNine opened this issue Dec 7, 2017 · 3 comments
Assignees

Comments

@ComingNine
Copy link

aes encryption bug if incoming byte >= 0x80

Summary

aes encryption has bug if incoming byte >= 0x80

Example

Please have a look at the link below: an incoming byte 0xff is encrypted to two bytes O_O

  • Version: 6.5.0
  • Compile time: 24/11/2017 16:40:58 UTC
  • User-Agent:
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
  • Link to reproduce
@ComingNine ComingNine changed the title <!-- Bug report: --> aes encryption bug if incoming byte >= 0x80 Bug report: aes encryption bug if incoming byte >= 0x80 Dec 7, 2017
@bwhitn
Copy link
Contributor

bwhitn commented Dec 12, 2017

Maybe this is the last nail in the coffin of CryptoJS. I haven't looked completely into it yet but appears to have something to do with how CryptoJS interprets strings internally. Maybe using node-forge would work and appears to use byte arrays for input. It also supports a wide verity of crypto. The license says it can be licensed under BSD or GPLv2.

@n1474335
Copy link
Member

@bwhitn I think you're right. We should try to move away from CryptoJS if we can. It's used in a number of places including the main encryption operations such as AES, DES etc, but also as the powerhouse behind our UTF8 support.

It's time we moved on to more modern libraries and web technologies, like TextEncoder and ArrayBuffers. I'm working on a new PR which will introduce these technologies in the CyberChef core, bringing us a step closer to replacing CryptoJS entirely.

Forge looks like a good alternative for the encryption ops and we should be ok on the licence front if it can be used under BSD. I looked into Forge a while ago but decided not to use it due to its size, however now that we have the module system, this is no longer an issue.

@n1474335 n1474335 self-assigned this Dec 31, 2017
n1474335 added a commit that referenced this issue Jan 1, 2018
…yptoJS, simplifying their options and adding many tests. Removed Rabbit operations. Fixes #63 and #210.
@n1474335
Copy link
Member

n1474335 commented Jan 2, 2018

Closed by #226

@n1474335 n1474335 closed this as completed Jan 2, 2018
BRAVO68WEB pushed a commit to BRAVO68WEB/CyberChef that referenced this issue May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants