tel / saltine

Cryptography that's easy to digest (NaCl/libsodium bindings)
https://github.com/tel/saltine
MIT License
61 stars 29 forks source link

Two different PublicKey types? #19

Closed gisenmann closed 7 years ago

gisenmann commented 9 years ago

Hi! More a question than a bug report: Is there a reason to have two different public (and secret) key types for box and sign? I think it would be ok, to use the same keypairs for both types for operations. Am I wrong? Currently I convert between both via isEncoding, but that feels a little bit poor. Götz

tel commented 9 years ago

Hi!

It's a very bad idea to mix these keys. They're not actually compatible as types at all. The base documentation is here

which suggests that the keys aren't even necessarily the same length!