Skip to main content
6 votes

Encrypting arbitrary large files in AEAD chunks - how to protect against chunk reordering?

This is the sort of thing that Additional Authenticated Data (AAD) was made for. One potential attack that an AEAD cipher needs to address is the adversary taking a valid encrypted message (that was ...
poncho's user avatar
  • 148k
5 votes
Accepted

Is there any way to measure entropy of encryption algorithms in python?

Ciphers are deterministic. As such there is no such thing as "ciphertext entropy". Given a certain key, IV, and plaintext you should always get the same ciphertext. If neither of those ...
Maarten Bodewes's user avatar
  • 93.2k
3 votes
Accepted

ChaCha20 as a block cipher

It's not possible to use any existing part of ChaCha# as a block cipher. In particular, I read this statement as incorrect: With the key, the entire (ChaCha) block function can be reversed. Chacha's ...
fgrieu's user avatar
  • 142k
3 votes

Constant values of ChaCha20

The constant in Salsa20 and ChaCha20 is a nothing-up-my-sleeve string, expand 32-byte k. So it becomes more of a philosophical question about changing such ...
user71659's user avatar
  • 298
3 votes
Accepted

Encrypting arbitrary large files in AEAD chunks - how to protect against chunk reordering?

Unfortunately the above documentation is more focused on its properties and usage instead of how this construct works. libsodium's secretstream is defined in the documentation, although I will admit ...
samuel-lucas6's user avatar
1 vote

Can you use ChaCha20 as one-time pad?

Are you entirely clear as to what a one time pad is exactly? If you can input one time, truly random keys into the ChaCha state, you don't need the ChaCha bit. You could just use the key generator ...
Paul Uszak's user avatar
  • 15.6k
1 vote

Can you use ChaCha20 as one-time pad?

No, probably not. For it to be theoretically secure each resulting key stream should be as likely any other after going over the entire key space, given a nonce. This is unlikely as the output is ...
Maarten Bodewes's user avatar
  • 93.2k
1 vote

Hamming Distance and Avalanche effect in Cryptography?

An encryption algorithm is meant to model a pseudorandom permutation, and I think at its heart your experiment is about trying to determine how well AES does this. It sounds like you are analyzing the ...
bmm6o's user avatar
  • 1,102
1 vote

Hamming Distance and Avalanche effect in Cryptography?

Yes there is 😃 Hamming distance and the behaviour of the avalanche effect are closely related. From here we see that the hamming distance $d$ between two strings $a, b$ is $d(a,b)$. It's the number ...
Paul Uszak's user avatar
  • 15.6k
1 vote
Accepted

Why doesn't ChaCha use a 512bit key and xor parameters into it?

The obvious downside is there would be $2^{256}$ weak inputs (key-nonce-counter) due to ChaCha requiring constants to break symmetry (see this paper at 3.1 about NORX permutation based on ChaCha) and ...
LightBit's user avatar
  • 1,659
1 vote
Accepted

48-bit nonce reuse with ChaCha20

If I use the 48-bit random nonce and change the key every day, would this solution be secure? Well, every day, you will be (in aggregate) sending $20 \times 86,400 = 1,728,000$ encrypted messages ...
poncho's user avatar
  • 148k
1 vote

Chacha20 key/nonce/counter correct usage

I assume input to a hash function would be key and nonce. I think it is ok to hash key and nonce, if you want to use bigger nonce as XChaCha does something similar to extend nonce, but I would keep ...
LightBit's user avatar
  • 1,659
1 vote
Accepted

ChaCha20-Poly1305 and AES-GCM-SIV output size

I managed to free up just a little bit more than double the available space per message, so I can safely add a 128-bit tag so that we can have authenticated encryption. The choice I am going to make ...
Florebol's user avatar
1 vote

Recommended output filter for Rumba20

What's an appropriate output filter for Rumba20? After coming across this other question, I discovered the RFSB paper mentions the following: To build a full-fledged cryptographic hash function, ...
samuel-lucas6's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible