Better HN
topnewbestaskshowjobs
Log inSign up

thatonelutenist

49 karma · joined Feb 20, 2020 (6y ago) · 7 submissions

Submissions

comment 5y ago · link · parent

Of course you can't, its just a visual aid. The point is to say that if a cipher _completely_ breaks down at (some imaginable amount of data), then its probably not behaving itself too well at (some much more reasonable, but still large, amount of data). AES-CTR already starts to questionable in some respects at 2^40 encryption with the same key (nonce isn't relevant, it changes with every block anyway), which is only 128TiB. Sure that's a lot for the average joe, but one could eaisly imagine someone wanting to encrypt that much data with a single key, just go checkout /r/datahoarder if you don't believe me.

And sure, good key rotation fixes that, but that's another foot-gun, and how should the average end user know if their application is using proper key rotation or not?

comment 5y ago · link · parent

Its also feedback that doesn't really land, since the library I'm working on that this blog post was written in the context of actually does make extensive use of AAD, namely for verifying segment headers in files which must appear in plaintext for the protocol to work, but I'll allow it since this was posted to HN without context

comment 5y ago · link · parent

The library that this was written for does in fact do all of the above, and I actually did look at your library for inspiration when I was doing background research. Big fan of your blog by the way.

Though given the blog post is devoid of the context, and its apparently blown up a little, this is a valid wording concern and I'll edit the title.

comment 5y ago · link · parent

In the library I wrote this post for, the encryption and mac keys are separate, with both the keys being randomly generated, and then persisted to disk encrypted with an argon2 produced key (with some tertiary validation), which is what I generally recommend. The use of Blake3 as the mac _should_ avoid most of the problem with using a key that's derived from a password, but I very much like not leaving that door open.

comment 5y ago · link · parent

That's a valid point on wording, that I tried to toe carefully with the "effectively an HMAC", as this post was written for a more general audience and I didn't want to go too far into the details, I wrote it to have something to point to when the inevitable questions roll in.

Balancing the lies-to-children is always a hard job

comment 5y ago · link · parent

Its section 2.1 of the paper: https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blak...

Though, note, blake3 still provides enhanced resistance against the attacks against blake2 even in the case where you only have one block, due to the change in how the fundamental hashing primitive is used.

comment 5y ago · link · parent

It's a bit more complicated than that.

Yes, the core of blake3 is a modified blake2b with fewer rounds, and yes the person who wrote the "Too much Crypto" paper is one of the blake authors, but there are other aspects of the construction that contribute as well.

Blake3 operates in a merkle tree mode using the modified blake2 as a node hashing function, which, in and of itself complicates attacks for reasons explained in the blake3 paper. Blake2 also didn't really have that many rounds to start with, Blake3 only reduces the round count from 10 to 7. A good _most_ of the speedup in Blake3 is due to the change in construction, the merkle tree mode allowing for unbounded parallelism, and not having the SIMD-friendly version be a variant. The parallel variants of Blake2 are already _almost_ as fast as Blake3 even without the round reduction (hell, BLAKE2sp can actually be faster than Blake3 in the right conditions).