Skip to main content

Questions tagged [nacl]

NaCl (an abbreviation of Networking and Cryptography library, pronounced "salt"), is a library for network communication, encryption, decryption and signatures.

Filter by
Sorted by
Tagged with
2 votes
1 answer
277 views

How to use (py)NaCl/libsodium for key wrap, key encapsulation

We want to wrap / encapsulate a symmetric key with an asymmetric keypair, a symmetric key with a symmetric key, a private key with a symmetric key. In each case, we'd like to allow several keys to ...
BGWPVqRM3xIg's user avatar
4 votes
1 answer
332 views

Can I HMAC my plaintext for use as a NACL SecretBox nonce?

I'm writing an application that needs to deterministically encrypt some data (where two equal ciphertexts will produce two equal plaintexts; this is acceptable and in fact desirable for this ...
fe_alice's user avatar
1 vote
2 answers
305 views

Replay Safe Mutual Authentication (libsodium)

I am working on an end-to-end encrypted messaging application as an educational activity with some of my extra time. I have chosen to use libsodium for the underlying crypto. I have run into a hang-up ...
RenderedNonsense's user avatar
0 votes
2 answers
330 views

derived key from email + password?

When deriving a private key from a password, will the resulting secret key be any weaker if the user email is included in the function input? Meaning, user email concatenated with the user password. ...
rm.rf.etc's user avatar
  • 109
1 vote
0 answers
167 views

Why don't the nacl public key primitives for signatures and authenticated encryption use the same keys?

The nacl.cr.yp.to source code has separate methods for doing public key encryption: https://nacl.cr.yp.to/box.html and for verifying signatures: https://nacl.cr.yp.to/sign.html I would expect that a ...
Kevin Burke's user avatar
0 votes
2 answers
227 views

Confidentiality and Authenticity of the Key in a Key-Value Store

What, if anything, can be used to provide confidentiality and authenticity guarantees for the storage keys used to store data in a key-value store? To be clear what I mean by the storage keys - I ...
jah's user avatar
  • 420
0 votes
2 answers
2k views

BLAKE2b 256 or 512?

I'd like to use a hash function for file integrity checking and am influenced by the choice of BLAKE2b as the default hash function in Sodium. My library gives me the option of choosing digests ...
David Braun's user avatar
7 votes
1 answer
2k views

How to restrict dlopen() from or to certain paths?

If I want to disable execution of programs on a filesystem, I can use the noexec mount option. However, this doesn’t works with dynamic libraries loaded throughdlopen(). So what is the way to do it ...
user2284570's user avatar
  • 1,472
1 vote
1 answer
1k views

How does (Py)NaCl work exactly?

At the moment, I deal with PyNaCl (Docs) and have a question about it: My situation is that I want to create a server that interacts with clients. Both the server and the client will have a long-term ...
Aliquis's user avatar
  • 879