Questions tagged [xsalsa20]

XSalsa20 is a variant of the Salsa20 cipher with a longer nonce.

Filter by
Sorted by
Tagged with
0 votes
1 answer
533 views

How to choose between AES256-GCM, XSalsa20Poly1305 and XChaCha20Poly1305?

In libsodium, there're 3 symmetric encryption(stream cipher) which are AES256-GCM(Hardware-accelerated), XSalsa20Poly1305 and XChaCha20Poly1305(uncertain which version of libsodium add support to ...
user avatar
  • 91
8 votes
1 answer
629 views

Understanding the impact of partitioning oracle attacks on stream ciphers

Yesterday I came across some conversation discussing partitioning oracle attacks, against authenticated stream ciphers like ChaCha20 and Salsa20 with poly1305 for MAC. As I understand it (though the ...
user avatar
  • 1,264
1 vote
1 answer
202 views

XSalsa20 + Poly1305 authentication wtihout tag

Do I understand correctly that XSalsa20 + Poly1305 provides authentication without a tag? If so, then how does that work? I came to that conclusion by reading http://nacl.cr.yp.to/secretbox.html, &...
user avatar
1 vote
1 answer
285 views

Can we encrypt part of the XChaCha/XSalsa nonce?

The xChaCha cipher detailed here extends the nonce 192bits and works as follows (from the link): Pass the key and the first 16 bytes of the 24-byte nonce to HChaCha20 to obtain the subkey. Use the ...
user avatar
  • 1,423
0 votes
0 answers
253 views

Secretbox- algorithm Poly1305 and cipher Xsalsa20

I use Rclone, which uses Secretbox to authenticate and encrypt data. Secretbox uses the Poly1305 authentication algorithm and the Xsalsa20 symmetric flow cipher. This whole process takes some time (...
user avatar
3 votes
1 answer
1k views

Composition of X25519+XSalsa20+Poly1305

In a correct implementation of X25519+XSalsa20+Poly1305, I think I have the right understanding in saying that the Poly1305 message authentication code is a ...
user avatar
  • 1,264
0 votes
1 answer
400 views

Authenticated encryption using libsodium's crypto_box_curve25519xsalsa20poly1305

It seems that crypto_box_easy, generates a random nonce and appends it to the cipher text in libsodium. I understand using the same nonce with the same key can be ...
user avatar
  • 1,264
1 vote
1 answer
187 views

Is it OK to just hash a symmetric key to derive an authentication key?

I'm using xsalsa20poly1305 for encryption in my program from libsodium. The recommended size for chunks is 4 kB. In that case, poly1305 will have authentication only for the the individual 4k chunks. ...
user avatar
7 votes
2 answers
722 views

Is there an upper limit to plaintext size in XSalsa20Poly1305?

While fiddling with the NaCl implementation in Go, specifically SecretBox, a general crypto question came up after reading the documentation. Quote: Package secretbox encrypts and authenticates ...
user avatar
  • 1,413
2 votes
1 answer
341 views

Bouncycastle and Salsa rounds

Salsa by Daniel J. Bernstein was meant to run with 20 rounds. As i can configure the rounds in Bouncycastle with Salsa20Engine, do i have better security by increasing the rounds to 1000? The ...
user avatar
2 votes
1 answer
1k views

Is a KDF needed when using X25519 for ECDH and XChaCha20-Poly1305 for AEAD?

Is a KDF needed when using X25519 for ECDH and XChaCha20-Poly1305 or XSalsa20-Poly1305 for authenticated encryption? My hypothesis is "no" because the key from X25519 is less than 256 bits long; ...
user avatar
  • 4,653
4 votes
2 answers
595 views

Can one extend the nonce of ChaCha/Salsa20 by XORing the extra bits with the key?

Can one extend the ChaCha and Salsa20 nonces by XORing the extra nonce bits with the key? My reasoning is as follows: the Rumba compression function allows attackers to supply any 48-byte input to ...
user avatar
  • 4,653
3 votes
1 answer
1k views

Does XChaCha20 exist with similar properties to XSalsa20?

Does XChaCha20 (built from ChaCha20 just like XSalsa20 is built from Salsa20) exist and have XSalsa20's desirable properties?
user avatar
  • 4,653
2 votes
1 answer
1k views

Is XSalsa20-Poly1305-SIV a reasonable choice for nonce-misuse-resistant authenticated encryption?

Consider XSalsa20-Poly1305-SIV. This is obtained by: computing a MAC $t_{secret}$ of the plaintext from the key and nonce, as in ChaCha20-Poly1305 except that the plaintext, not the ciphertext, is ...
user avatar
  • 4,653