64 points · by conductor · 8y ago · 9 comments
Nonetheless, this is only really valuable for learning and for toys. In production, you should use existing, tried and true libraries.
For an example of a hard-to-implement spec, see e.g. SPECK[1]. The order of everything is confusing: endianness, x/y variables in the pseudocode, and so on[2,3].
[1] https://eprint.iacr.org/2013/404.pdf
[2] https://github.com/timw/bc-java/blob/feature/simon-speck/cor...
The problem is the reallocation of bits from the block counter to the nonce, which they even admit might be problematic: "The amount of encrypted data possible in a single invocation is 2^32-1 blocks of 64 bytes each, because of the size of the block counter field in the ChaCha20 block function. This gives a total of 274,877,906,880 bytes, or nearly 256 GB. This should be enough for traffic protocols such as IPsec and TLS, but may be too small for file and/or disk encryption."
Are you kidding me? WHY, would anyone deliberately put in a flaw that wasn't there originally? And introduce an completely pointless incompatibility?
- It is insane that this is only being published now.
- It is insane if this document means anything or enables anything (other than, I suppose, providing a new, IETF-formatted reference for Chapoly).
Chrome has supported Chapoly since (apparently) 2013. Why did it take 5 years to standardize it? Does standardization mean anything? I'm O.K. if the answer is "no, not in any practical sense".
(But: see below.)
I am prepared to be comically wrong!
Chalk it up to a neural misfire.