Skip to content
This repository has been archived by the owner on Feb 6, 2021. It is now read-only.

KeyPair from secret produces different result than libsodium impl #55

Open
lvh opened this issue May 5, 2016 · 1 comment
Open

KeyPair from secret produces different result than libsodium impl #55

lvh opened this issue May 5, 2016 · 1 comment

Comments

@lvh
Copy link

lvh commented May 5, 2016

KeyPair in kalium just does the point mult with whatever the input was. The seed API in libsodium hashes the input to 32 bytes and then does the point mult. Is that intentional?

Cc @cbowdon, who might care about the behavior in caesium, since he submitted the PR for it. I might be changing this to use the libsodium API.

@bendoerr
Copy link
Contributor

bendoerr commented May 5, 2016

Not sure that the original intent of KeyPair(byte[] secretKey) is supposed to mimic crypto_box_seed_keypair but rather the case where crypto_box_keypair was used. On my branch where I was trying to get Kalium up to date with current libsodium I added a constructor that uses crypto_box_seed_keypair explicity.

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