You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fwiw, I think it's totally the right way to do (passing keys around as KeyPair instances rather than byte arrays & storing private keys in sodium_malloc'd memory). The "problem" I'm facing with NSec is that API users are consistently undermining this by recreating the KeyPair instances from byte arrays on every single library invocation. I guess this might be less of a problem in a Noise implementation, which will probably more likely expose a "HandshakeState"- or "Connection"-oriented API rather than an "Algorithm"- and "KeyPair"-API.
In order to facilitate secure memory solutions,
KeyPair
:KeyPair
storage (i.e. in factory methods alaCurve25519.GenerateKeyPair
buffer.Clear()
to zero out memory on disposal, rather deferring to something likelibsodium_free
This is a pre-requisite for enabling secure memory scenarios in this library, and could work for PSKs in the
Protocol
API methods.The text was updated successfully, but these errors were encountered: