Questions tagged [chacha]

ChaCha is a family of stream ciphers proposed by Daniel J. Bernstein, as an evolution of Salsa20 with (conjecturally) improved resistance to cryptanalysis.

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

ChaCha Single-Use RNG with All Zero Plaintext + Nonce

I am creating an internal application that will be used to generate and manage self-signed certificates and certificate authorities. Its primary use will be for generating certificates used in SSL ...
user avatar
  • 145
4 votes
0 answers
100 views

Why Block Ciphers

I​ fail to understand what block ciphers can do that stream ciphers cannot. Also aren't they construct able from one another. prg(stream cipher) -> prf -> prp(block cipher) Any practical example ...
user avatar
  • 41
0 votes
1 answer
88 views

What is the lightest cipher that provides AES like security?

The lightest, or fastest cipher, that is well known and quite secure like AES. Is ChaCha20 a good option? Are there any better alternatives that are faster but still as secure?
user avatar
1 vote
1 answer
103 views

XChaCha20 vs AES 128 security and speed

Is XChaCha20 with 256 bit key and 192 bit nonce more secure than 128 bit key 128 bit key nonce AES, due to using larger key/nonce sizes? Isn't it supposed to be faster due to being a stream cipher? (...
user avatar
1 vote
1 answer
43 views

How to interpret algorithm diagrams

It's been a while since I know about cryptography, and always end up seing diagrams like this. However I have never been able to understang their meaning. I hope someone can explain in detail. Thank ...
user avatar
0 votes
1 answer
54 views

Encrypting two messages with the same content with different keys/IVs still secure if attacker knows they are the same?

I want to store two ciphertexts inside the same file. The data stored in each ciphertext is the same (except for padding), but the data was encrypted with different keys and IVs. Both ciphertexts were ...
user avatar
  • 3
1 vote
2 answers
96 views

Faster cipher than AES256-CBC to use for DRM purpose

I have to develop a program using a "secret" locally stored encoded program for a school project. For this I have to decipher the code on the fly to use it. The project recommend the use of ...
user avatar
0 votes
0 answers
52 views

Nonces in chacha20poly1305 vs chacha20

I'm currently working on replacing the chacha20 encryption in my app with chacha20poly1305, but I'm running into a few questions that I can't seem to find clear answers to, mainly stemming from the ...
user avatar
0 votes
0 answers
50 views

Applicability of theoretical attack procedure in actual attack to ChaCha cipher

I was studying the theoretical attacks on ChaCha cipher here (See section 3). There is one special attack procedure which require key-IV(Initial Vector) pairs. These key-IV pairs are special in the ...
user avatar
0 votes
1 answer
88 views

XChaCha20 With a Zeroed Nonce?

We know that for ChaCha20 and XChaCha20, the same key can never be used with the same nonce. But let's say I use a random 256-bit key every time... Then the nonce can be whatever because the key is ...
user avatar
  • 421
0 votes
1 answer
76 views

Can the security of Salsa20/Chacha20 be expanded to 448-bits if I fill the nonce and the Nothing-up-my-sleeve numbers with key material?

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-...
user avatar
1 vote
0 answers
96 views

xChaCha20 Block Keys for Poly1305

So xChaCha20 has a nonce size large enough to safely use a random nonce with the same key. Poly1305 generally uses the first block of the cipher's output to generate its nonce. For xChaCha20 it would ...
user avatar
  • 111
0 votes
1 answer
529 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
1 vote
0 answers
86 views

What is the best way to save ChaCha20 Nonce in Cipher-Image BMP file?

I have a question about ChaCha20. As far as I know ChaCha20 is a cipher algorithm that uses 4 inputs: Key (secret) Constant (not secret) Block Number/Counter (keystream block number) Nonce (random ...
user avatar
  • 75
1 vote
1 answer
216 views

Does Salsa20/ChaCha20 still provide Integrity when Encrypt Bitmap?

Forgive me for this question. I have an idea to encrypt *.bmp bitmap files using ChaCha20/Salsa20 without Poly1305. This is just a simple program, where I can encrypt *.bmp bitmap images, with the ...
user avatar
  • 75
0 votes
1 answer
74 views

Where can I find test vectors for ChaCha20 (trying to understand Wikipedia example)?

I was playing around with stream ciphers an found this Wikipedia ChaCha20 page (the ChaCha variant). What I'm lost with is how to test this code. There are no testvectors anywhere on that page and I ...
user avatar
1 vote
0 answers
57 views

Impact of partitioning oracle attacks on file encryption?

I've just learned about partitioning oracle attacks recently, and I would like to clarify some things that are a little foggy to me right now. According to this thread, The aim is the recovery of a ...
user avatar
  • 421
1 vote
1 answer
98 views

Is using only one or two test vector(s) for ChaCha20 enough for validation of coded algorithm?

For validating the ChaCha20 encryption/decryption algorithm written in VB.NET, I am looking for more ChaCha20 test vectors that are based on the final spec for ChaCha20 that can be found here. See the ...
user avatar
3 votes
1 answer
359 views

XSalsa20Poly1305 for encryption at rest

I just found a project that used XSalsa20Poly1305 for transit and encryption at rest. I am trying to find some information if that is something worth trusting data to. It feels a little hard to put ...
user avatar
  • 133
2 votes
1 answer
634 views

It possible to encrypt .bmp bitmap files using Stream Cipher Chacha20?

Maybe this sounds like a stupid question. I'm sorry for that. I just wanted to know is it possible to encrypt a bitmap image file like *.BMP, and generate the ciphertext which is an obscure bitmap ...
user avatar
  • 75
5 votes
1 answer
542 views

NIST LWC finalists (AEAD) vs ChaCha20-Poly1305

NIST LWC finalists announced. My question is that how finalists are faster or slower than current golden lightweight AEAD standard -- ChaCha20-Poly1305. Some benchmark among chacha20-poly1305 vs LWC ...
user avatar
  • 53
2 votes
3 answers
331 views

Benchmark for CSPRNG as stream ciphers?

My limitation in my security protocol is that I want my RNG as CSPRNG and I also want it to be super fast. If I use Salsa20 or ChaCha or AES counter mode, I don't get the desired speed. I want my PRNG ...
user avatar
1 vote
0 answers
155 views

Constructing an XChaCha20-Poly1305 Equivalent using FIPS-140 Primitives

I am playing around with the idea of modelling clustered data storage as a series of AEAD messages. XChaCha20-Poly1305 has nice properties for my intended design, as the ability to use random IVs ...
user avatar
  • 111
1 vote
0 answers
105 views

Implement deterministic authenticated encryption using libsodium

Note: this is my first question on stack exchange, let me know if you miss some details to answer and I will edit the question accordingly Context I'm willing to create a git encryption tool (...
user avatar
  • 11
1 vote
1 answer
676 views

Is it safe to use many nonces for XChaCha20?

I have a very simple question. Since XChaCha20 nonces are 192-bit, there's technically no limitation to the max number of message encrypted, since the chances of two random nonces being the same are ...
user avatar
  • 421
1 vote
1 answer
593 views

Can ChaCha20 provide integrity?

I have read that in general stream ciphers do not provide data integrity. Can ChaCha20 be implemented in such a way (perhaps like counter mode with message authentication in AES) to provide this?
user avatar
1 vote
1 answer
102 views

Can Stream Cipher be Used to Encrypt & Decrypt a File (Eg: .txt .docx .exe .zip)?

I was new to cryptography. And I know that in the world of cryptography there are two types of Symmetric Algorithms: Stream Cipher (RC4, Salsa & Chacha) Block Cipher (DES, AES) And when doing ...
user avatar
  • 75
8 votes
1 answer
627 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
4 votes
2 answers
2k views

Changing an Encryption scheme from AES to ChaCha20

I am using the AES cipher for my OTT platform. Almost all Chip vendors (ARM, Intel, etc) have built-in AES for faster and secure processing. Now, how feasible it is to move from AES to ChaCha20? ...
user avatar
  • 560
3 votes
2 answers
1k views

What are best practices for long term storage (~20 years) of encrypted / sensitive files?

I have some very sensitive family files that I want to store in the cloud on multiple providers for maximal reliability and redundancy. It's essentially a large archive of all our family photos, ...
user avatar
  • 421
1 vote
0 answers
52 views

Encryption: filename + timestamp as info for HKDF-Expand

Let's assume that a user wants to symmetrically encrypt the files in one of his folders (being able to decrypt them later). For this, I have come up with the following procedure: A random 32 byte ...
user avatar
  • 11
0 votes
1 answer
85 views

Symmetric key as proof of ownership of a session?

I have a question, or rather multiple questions that all relate to the same topic. I am building an application with both a frontend (FE) and a backend (BE). All communication between FE and BE is ...
user avatar
0 votes
1 answer
397 views

Security of ChaCha compared to AES and Serpent

I'm trying to understand how secure XChaCha20 is in comparison with other ciphers. From what I know, ChaCha is more secure than AES, but less secure than Serpent. My question is how much more "...
user avatar
  • 421
0 votes
0 answers
80 views

Is this a reasonable design for encrypting records in a key/value database?

A while back I designed a protocol for en encrypted key/value service. My main goal was to minimize the value of a breached database by using cryptographic algorithms where a brute-force cracking ...
user avatar
  • 101
2 votes
2 answers
240 views

Can I use ChaCha20-Poly1305 as my KDF?

I have two devices that use a PSK. One is embedded and extremely resource confined. I'm already using ChaCha20-Poly1305 so it would be "free" to reuse this. There is no transport encryption ...
user avatar
1 vote
0 answers
168 views

Would a key recovery attack on ChaCha's keystream would be made more secure with an AONT?

To be clear I'm well aware that ChaCha doesn't need to be "improved". Also, I have no intentions or misguided ideas about trying to "improve" it. My question is hypothetical, and ...
user avatar
  • 1,423
2 votes
0 answers
84 views

How are ChaCha-based ARC4Random CSPRNGs initialized and reseeded?

I'm doing a spare-time project to collect cryptographic algorithms, implement them, and lastly benchmark them. For the CSPRNG part, I'm evaluating NIST-SP-800-90Ar1 HMAC-DRBG and CTR-DRBG (Hash-DRBG ...
user avatar
  • 6,795
3 votes
0 answers
118 views

Does varying ChaCha rounds add any security?

This paper introduces 'Freestyle' a randomized, and variable round version of the ChaCha cipher. It uses the concept of hash based halting condition, where a decryption attempt with an incorrect key ...
user avatar
  • 1,423
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
1 vote
1 answer
317 views

How to increase Poly1305 performance?

I was analysing the Chacha20 algorithm and the Poly1305 MAC generation from RFC 7539. It seems that the Chacha20 is quite faster compared to AES on CPUs without hardware support like AES-NI. But ...
user avatar
7 votes
3 answers
2k views

What should the nonce value be for client-side encryption?

I am using the following chacha20poly1305 Rust library to encrypt some data in a desktop application. The user provides the key, which never leaves their device, to locally encrypt some data, and then ...
user avatar
1 vote
1 answer
198 views

Can repeatedly encrypting a message with a secure cipher ever produce the original input like what happens in ROT13?

Lets say we have a message 'm'. We encrypt 'm' using a stream cipher or any other type of cipher with cryptographic security that produces an output equal in length to the length of 'm'. Then if we ...
user avatar
  • 13
1 vote
1 answer
225 views

Is it okay to reuse a single symmetric key for a large volume of messages and HMACs, so long as "nonces" are randomly generated for both of them?

https://www.reddit.com/r/crypto/comments/fnku50/nonce_reuse_vs_iv_reuse/ Nonce reuse with the same key is catastrophic to security. The same premise holds for initialization vectors. If the key ...
user avatar
  • 49
2 votes
1 answer
552 views

Why is it secure to reuse key and nonce in ChaCha20-Poly1305 AEAD construction?

While looking at the ChaCha20 and Poly1305 AEAD construction as defined by RFC 8439, more precisely its use of the key and the nonce, I came up with the questions below. Maybe someone with some in-...
user avatar
0 votes
1 answer
153 views

Question about ChaCha20's security

I wonder the Stream Cipher ChaCha20 only changes 96 bits each block, why it can produce 512 bits keystream block, I mean in the concept of a random number generator, the ...
user avatar
  • 1
2 votes
1 answer
595 views

Is it safe to reuse the same nonce for decryption an indefinite amount of times in this context?

I'm creating a password management application and I'm considering using the following procedure to keep passwords safe: Asking the user for raw_password, for ...
user avatar
  • 407
2 votes
4 answers
1k views

Is Salsa20+Poly1305 an AEAD?

I see Chacha20Poly1305, XsalsaPoly1305 and AES GCM usually used and mentioned in literature and implementations as AEAD cyphers. My question is that Poly1305 provides authentication and Salsa20 ...
user avatar
  • 123
3 votes
0 answers
96 views

Provably secure way of expanding permutations

Gimli is a 384-bit permutation that makes use of an internal 96-bit permutation which works on columns. Every 4 rounds starting from the 1st a "small swap" is performed and every 4 rounds ...
user avatar
1 vote
1 answer
1k views

Is XChacha20 - Poly1305 Quantum resistant?

This is a question just out of curiosity, as I am a newbie to Post Quantum Cryptography. I have read several articles where they emphasize that current standardised symmetric encryption algorithms (...
user avatar
2 votes
1 answer
448 views

Which is the best algorithm for large scale file encryption other than AES?

I've been looking for a fast, powerful and robust algorithm for encrypting large files with authentication . I would like to implement the algorithm on my own without using third party software. I've ...
user avatar