-
Notifications
You must be signed in to change notification settings - Fork 72
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
Cryptographic libraries #144
base: master
Are you sure you want to change the base?
Conversation
y4my4my4m
commented
Dec 29, 2023
•
edited
Loading
edited
- AES128 gives the wrong output...but the code seems right
- ChaCha20 has some weird ASM exception error
- TweetNaCl simply doesnt pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the MemCopy() is writing over the ciphertext buffer.
res |= a[0](U32) << 0 * 8; | ||
res |= a[1](U32) << 1 * 8; | ||
res |= a[2](U32) << 2 * 8; | ||
res |= a[3](U32) << 3 * 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does promotion to U32 occur after one byte at a[3] is accessed? Considering << is multiplying by a power of 2, why do you need to multiply again by 8?
I64 i; | ||
// Define the plaintext message | ||
U8 plaintext[16] = "Hello, TempleOS!"; | ||
U64 plaintext_len = sizeof(plaintext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so 17?