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

Question about secretbox #46

Open
aitorru opened this issue Mar 2, 2023 · 1 comment
Open

Question about secretbox #46

aitorru opened this issue Mar 2, 2023 · 1 comment

Comments

@aitorru
Copy link

aitorru commented Mar 2, 2023

Dear sodalite developer,

I have been using your library and I have a question about the secretbox function. In the documentation, it states that the first 32 bytes of the message must be zero. Can you explain why this is necessary?

Thank you for your time and for creating this library.

Best regards,
Aitor Ruiz

@aitorru
Copy link
Author

aitorru commented Mar 2, 2023

Upon further investigation, I discovered that the function was not working because the first 16 bytes needed to be removed. This was resolved by comparing it with the JS implementation, with which I am more familiar.

While examining this problem, I began to wonder why the library does not include padding in front or remove the first 16 bytes automatically.

Additionally, I am curious whether it would be beneficial to implement a minimum length check of 32 in the C FFI implementation.

I would greatly appreciate your thoughts on this matter. Thank you for your time and consideration.

Best regards,
Aitor Ruiz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant