Skip to content

Conversation

@jeffro256
Copy link
Contributor

Part of upstreaming Carrot


void sc_1(unsigned char *s) {
int i;
s[0] = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know anything about cryptography, but what's to stop someone from accidentally passing in an empty character array? Why not have sc_1(unsigned char[32]) or sc_1(std::array<unsigned char, 32>&)?

Copy link
Contributor Author

@jeffro256 jeffro256 Apr 23, 2025

Choose a reason for hiding this comment

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

Nothing, the convention is to assume a 32 byte buffer. A signature of unsigned char[32] might be better, I was just sticking with what was currently done. std::array<unsigned char, 32>& would be incompatible with our current crypto types.

@jeffro256 jeffro256 mentioned this pull request Nov 27, 2025
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants