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

Nonce and salts not correct byte size #634

Closed
ooglykraken opened this issue Nov 20, 2017 · 1 comment
Closed

Nonce and salts not correct byte size #634

ooglykraken opened this issue Nov 20, 2017 · 1 comment

Comments

@ooglykraken
Copy link

ooglykraken commented Nov 20, 2017

I'm trying to use libsodium inside of a java project to handle some of the security features (obviously). However after getting libsodium on my Win10 pc and struggling to have it recognized by the Java project (libsodium-jna) when I run testing it fails on atleast 13 different functions. Every error is essentially the same where the value read into java from the c source is an incorrect size. For example when crypto_pwhash_scryptsalsa208sha256( args) is tested, the value from crypto_pwhash_scryptsalsa208sha256 is actually a different value (i.e. 148313329629134880, 63310704161062944) every time and forces a failure in comparison to length of a salt (32). In Java the exception is thrown as "SodiumLibraryException: salt is 32, it must be 63310704161062944 bytes" Of course this is mostly dependent on the Java library's implementation of everything but I was curious if you had any low-level insights as why it might getting incorrect values for the saltbytes. If more info is needed please let me know, If this isn't the right place to ask this question I apologize.

@jedisct1
Copy link
Owner

Hi,

This looks like a 32bit vs 64bit issue. But the best place to ask help with libsodium-jna would be its own repository: https://github.com/muquit/libsodium-jna

Repository owner locked and limited conversation to collaborators Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants