Skip to content

Cryptographic libraries - #144

Closed
y4my4my4m wants to merge 11 commits into
masterfrom
TweetNaCL
Closed

Cryptographic libraries#144
y4my4my4m wants to merge 11 commits into
masterfrom
TweetNaCL

Conversation

@y4my4my4m

@y4my4my4m y4my4my4m commented Dec 29, 2023

Copy link
Copy Markdown
Collaborator
  • AES128 gives the wrong output...but the code seems right
  • ChaCha20 has some weird ASM exception error
  • TweetNaCl simply doesnt pass

@mknos mknos left a comment

Copy link
Copy Markdown
Contributor

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;

Copy link
Copy Markdown
Contributor

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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so 17?

@y4my4my4m

Copy link
Copy Markdown
Collaborator Author

Did it properly in #188

@y4my4my4m y4my4my4m closed this Aug 1, 2026
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

Successfully merging this pull request may close these issues.

2 participants