Comments (8)
Stream ciphers use NONCEBYTES
, whereas AEAD constructions use NPUBBYTES
. In the CAESAR competition, optional support for a "secret" nonce was specified. Hence the distinction between a "public" and a "secret" nonce. In practice, this specification had little success, because the use cases were pretty limited.
Still, this is something that can easily be added later if needed.
from pysodium.
indeed, it seems: https://github.com/jedisct1/libsodium/search?utf8=%E2%9C%93&q=crypto_aead_xchacha20poly1305_ietf_NPUBBYTES&type=
@robehickman can you tell us something about this?
from pysodium.
I copied the constant from the sodium documentation:
https://download.libsodium.org/doc/secret-key_cryptography/xchacha20-poly1305_construction.html
from pysodium.
@jedisct1 Out of personal interest, where would a secret nonce be used?
from pysodium.
Lamport signatures and hierarchical encryption.
from pysodium.
Interesting, thanks.
from pysodium.
so i'm a bit confused, what is the right thing to do here to be as close as possible to libsodium?
from pysodium.
I would suggest using NPUBBYTES
for the AEAD constructions, and NONCEBYTES
for the rest, like the original API.
from pysodium.
Related Issues (20)
- New release for crypto_stream_xchacha20_xor support HOT 2
- crypto_generichash ValueError HOT 2
- crypto_secretbox_open_easy is missing HOT 1
- value of crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX bigger than it should be HOT 3
- ability to check version of pysodium in-code missing HOT 2
- Is it a minimal version? I cannot find functions like `crypto_core_ed25519_random` and .h file 'crypto_core_ed25519.h' and so on HOT 1
- Stale Python Pakcage index (2016-06-02) HOT 1
- Harmonize the interface of crypto_aead_chacha20poly1305_* HOT 1
- Inconsistent copyright for test/ HOT 2
- test_crypto_generichash fails with libsodium 1.0.13 HOT 14
- crypto_secretstream* functions? HOT 92
- Input range checking HOT 39
- Newly added functions lack version checks HOT 6
- PyPi version number not compliant with PEP 0440? HOT 4
- crypto_auth and crypto_auth_verify use empty byte string as a key by default HOT 1
- py3 strings f*ck up generichash HOT 1
- how to use a specific algorithm HOT 7
- crypto_secretbox_detached and crypto_secretbox_open_detached HOT 6
- Expose remaining crypto_core_ ristretto crypto_core_ristretto255_add and crypto_core_ristretto255_sub HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysodium.