pyca / pynacl

Python binding to the Networking and Cryptography (NaCl) library
https://pynacl.readthedocs.io/
Apache License 2.0
1.06k stars 233 forks source link

crypto_pwhash_scryptsalsa208sha256 is missing #700

Open Tronic opened 2 years ago

Tronic commented 2 years ago

There is no binding for the key derivation function crypto_pwhash_scryptsalsa208sha256.

crypto_pwhash_scryptsalsa208sha256_ll is available but it is not compatible because the cost parameter need to be calculated differently, and the libsodium function pickparams which does just that does not appear to be exposed.

Tronic commented 2 years ago

Actually the function for calculating those parameters is included as nacl_bindings_pick_scrypt_params, with an added note that you need n = 1 << N_log2, where N_log2 is the value returned by this function.

Still, it would be nice to have that higher level function too.