As I studied, Salsa20/Chacha20 is basically a hash function that accepts a 64-byte input and returns a output of the same size of input.

128-bits of the input are filled with four "Nothing-up-my-sleeve numbers", 64-bits with the nonce and the other 64-bits field with counter. The rest, 256-bits, are filled with the key.

My question is:

Being Salsa20/Chacha20 basically a hash function, can its security be expanded to 448-bits if I fill the "Nothing-up-my-sleeve numbers" and nonce fields with key material?

Would this impact the security of the cipher?

  • 2
    $\begingroup$ Why do you need the 448-bit key? 256-bit enough for all. There is XChaCha20 that has 192-bit nonces. You may look that $\endgroup$
    – kelalaka
    Dec 30, 2021 at 19:20
  • 1
    $\begingroup$ @kelalaka I told you, I have secrets I want to keep secret forever. I don't trust only 256-bit. Also, I wanna write a disk encryption program accepting keys up to 32768-bits, that's why I'm seeking for a encipherment scheme that allows this key sizes. I'm thinking on creating a modified Chacha20 with larger state sizes for that. $\endgroup$ Dec 31, 2021 at 1:00
  • 3
    $\begingroup$ "I don't trust only 256-bit." Why not? Why isn't several billion years enough? $\endgroup$ Jan 1, 2022 at 14:04
  • $\begingroup$ Because you can't mathematically prove it's a billion years can you? Not through civilian mathematics. We don't attack ciphers via brute force. We go around them and through the middle. That's why we use one time pads. $\endgroup$
    – Paul Uszak
    Jan 1, 2022 at 17:45

1 Answer 1


No, it cannot. A nonce is necessary to have any security at all if a key is ever reused. The "nothing up my sleeve" number is necessary to keep the input from all being attacker controlled, it prevents the all-zero block, and its asymmetry improves the confusion and diffusion of the function.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.