« first day (2866 days earlier)      last day (1815 days later) » 

1:19 AM
That doesn't say much, now, does it?
 
2:03 AM
no, but the parts are all there.
 
 
4 hours later…
6:15 AM
@SqueamishOssifrage It sounds to me that transcribing it into pseudo-code could be a happy medium as it won't be executable but could be more readable to non-math folk.
 
 
3 hours later…
9:05 AM
@Maeher if you're also at the workshops, look out for a guy in a bright green shirt wearing my potato avatar and a crypto.se logo as pins
(I'll be here all days)
 
 
2 hours later…
11:15 AM
Ugh, somebody mentioned the Tink API to me at StackOverflow.
If that's "crypto made easy" then I don't know. Undocumented methods, somebody asked on SO on how to create keys from data :P
 
11:59 AM
@MaartenBodewes yeah, when I evaluated this API for usability for a seminar, it didn't look too well :p
 
@SEJPM so far I did not spot you
 
12:48 PM
@Maeher I was away during lunch, try again during the next coffee break ;)
 
@SEJPM skipping food? Unfathomable!
 
1:23 PM
@Maeher I actually had a reason, will tell you when we meet ;)
 
 
2 hours later…
3:03 PM
@StevenHatzakis Why are you treating executability as if it's a bad thing? If the expository value is the same, why is it preferable to invent a new language that no machine on the planet will interpret in the hope that a human reader can guess what it means? Why is this a useful criterion to strive for? Why would you want to take a clear fragment of code that works and runs, and turn it into one that doesn't work?
 
New rule: All code samples appearing on crypto.stackexchange must be written in Malbolge
 
And, let's take this criterion at face value. Suppose you wrote a fragment of ‘pseudocode’. Suppose, then, that someone did guess what you meant, and wrote an interpreter for the language that seems to execute the algorithm as you described it. Would that turn the ‘pseudocode’ from a good, admissible exposition into a bad, inadmissible exposition?
 
3:21 PM
@EllaRose Maybe MIX was a good language for abstract algorithmic descriptions, until someone wrote software to emulate a MIX machine?
 
3:36 PM
That's this one that I managed to never hear of before?
If so, it says it frequently requires self-modifying code, so that could be fun!
 
3:47 PM
It actually goes much deeper than a mere question about exposition or rules on crypto.se; when we write papers with proofs of theorems that are only human-verifiable, and there are mistakes in the typography, those can be transcribed by humans into software that is then used for, oh, I dunno, managing billions of euros of economic value in the Zcash network, until someone notices the typo.
Or when the Swiss election authority writes a paper proving various security theorems, including anonymity and verifiability of the vote, and then some software drudge at a government contractor is tasked with transcribing the idea from the paper into code, and they pick a group element uniformly at random as required by Pedersen commitments by choosing an exponent uniformly at random and raising a standard base point to it…
Which makes it seem all the more positively bonkers to demand a gap between exposition and execution!
 
4:21 PM
Note that nobody really posts "executable" code on Crypto.SE; you need more than just a code snippet for that (include statements etc.). Hence, at least with regards to the site, I'd rather talk about validated source code of a particular PL.
2
 
4:49 PM
2
A: OCB and GCM security

Martin M. LauridsenIf you look in the OCB submission for CAESAR, you will see that the designers state the security is similar to that of GCM. I would note, however, that GCM has been shown to posses weak key classes, see for example: https://eprint.iacr.org/2013/144.pdf https://eprint.iacr.org/2011/202.pdf http:...

I wasn't aware of weak keys. Is that actually true?
 
Apparently yes, if you consider just GHASH. It will of course not influence the underlying CTR mode.
GCM is a brittle little mode.
 
So TIL, that Robustness is the property of an AE cipher so that for any properly encrypted ciphertext you cannot find a second different key that also yields a successful decryption.
And even more amusingly GCM is not robust.
Which actually lead to an attack on the Facebook Messenger Content moderation system.
Also there is apparently a standardization effort going on I totally missed to standardize Messaging Layer Security (MLS) similar to TLS for a fancy group messaging protocol.
 
5:08 PM
Hmm. I didn't know either of those either.
I did know that truncating GCM tags isn't safe, but I've never looked into why.
@SEJPM Where would robustness be necessary?
 
@FutureSecurity Ok, so I will now layout the attack here for you
So for large file attachments Facebook Messenger creates a commitment to the file's key
Then the file is encrypted with the key using AES-GCM
and send to the recipient. So far so good.
Now if you can find a second key that yields a valid encryption under that ciphertext, you again commit to the key and send the encrypted file.
Now, the recipient can also report your message at which point the cleartext with the commitment to the key will be sent to facebook.
However if one of these ciphertext decryptions is a harmless image and the other one is an abusive one and you do the ordering right, the system will deduplicate based on the ciphertexts (if I understood it correctly) and show the moderator the harmless image
(details and correct descriptions should be in the paper, section 3)
 
Concise. Thanks. Exploiting deduplication is clever.
 
5:54 PM
It's a shame EAX mode was never standardized officially. CCM is a PITA. If I'd trust anything it is probably EAX which basically is just CTR + CMAC in a predefined configuration.
 
@MaartenBodewes yeah, EAX looks really nice (from a complexity and contract PoV) :(
 
It's got a bit more overhead, but way less brittle. And it only requires AES(-NI).
 
@MaartenBodewes doesn't it also get utterly destroyed by nonce re-use?
 
Of course. CTR.
 
@MaartenBodewes hmm, how hard does the MAC get hit by nonce-reuse? Isn't it even determinstic?
(don't make me go and actually read the spec :p )
 
5:58 PM
Yeah, it is deterministic over the IV, AAD and plaintext or ciphertext commonly. I'll have to check if it was plaintext or ciphertext, I haven't got a photographic memory.
Um. Wait. That's always the case. What was the question again?
Ah, I don't see how you can get any information about CMAC by nonce-reuse, so generating a valid MAC for another message seems unlikely. I think that's what you were after, right?
 
@MaartenBodewes yeah, as nonce-reuse leaks the MAC key for GCM
 
I'm pretty sure that the "MAC" key for CMAC is just the AES key. Good luck getting that :P
The problem with GHASH are the H and Y values, which act as key for the MAC. They are only derived from the AES key, while CMAC uses it directly.
Hmm. Is there actually a single pass streaming mode of operation that does not fail catastrophically for nonce reuse?
 
@MaartenBodewes there's an impossibility result for proper nonce-misuse resistant AE for online ciphers
the best they can hope to achieve is what CBC does: leaking the common prefix
for everything else you have to buffer the whole message
 
Yeah, that's why I put in non-catastrophic :) And I presume such a stream cipher must be plaintext aware. There is of course CBC-CTS, but that also has some drawbacks.
E.g. it doesn't take a nonce.
Define catastrophic..... BOOM!!!!
 
well I thought there was an impossibility result, but a quick search didn't turn up anything...
@MaartenBodewes simple: CBC with normal padding, then apply CMAC or HMAC on top of that
should give you the best possible security for nonce-reuse while still being (somewhat) streamable
 
6:10 PM
Yeah, and you could encrypt a nonce with the same cipher if you need to use a nonce.
However: no fully online mode, no skipping, no buffering of key stream and no parallel operation.
Do you need those for an AEAD cipher though?
 
@MaartenBodewes skipping? no. Buffering of keytream would be nice to use wide-vector bitsliced AES
 
I like online mode though. Using block ciphers and streams is horrid if you don't have it.
 
@MaartenBodewes oh yeah, online AEs certainly are convenient
 
(of course Java already broke the online property for decryption, but yeah)
 
though sometimes they can't give you the best possible guarantees...
@MaartenBodewes online decryption is kinda dangerous though
you don't want the dev to get their hands on unauthenticated plaintext
thinking crypto magic did its thing
 
6:16 PM
Well, sometimes you just want to write the stuff directly to file and destroy (or not use / move) the file if there is a tag mismatch.
It's a bit of a shame if you cannot even create a good method of getting the plaintext without buffering it all in one contiguous, hidden block of memory.
LOL: you buy this media outlet and your companies get all government contracts. On video. "I was framed". That's correct, you were framed to be corrupt by a hidden camera.
Sorry, watching the news :)
 
6:40 PM
@SqueamishOssifrage I never implied any of that, you misunderstood my comment. I saw that someone said that something like 'executable code is not permitted on crypto.stackexchange', which is a statement I haven't even verified, but I simply offered a solution where if someone had executable-code they wanted to share but were worried that it isn't permitted they can translate it to pseudo-code. I am not arguing which is better worse etc..
It would seem silly if it wasn't permitted except for on the main stackexchange site, again not sure if there is any truth to those requirements.
 
7:09 PM
@FutureSecurity The putative theory of GHASH weak key classes is true and misleading and irrelevant, and the line of papers on the subject have led many people into regrettable confusion about the security of authenticators. I go into further detail here:
4
A: GMAC vs HMAC in message forgery and bandwidth

Squeamish Ossifrage Saarinen in his work GCM, GHASH and Weak Keys says that; This paper is not very clear and has led many people into regrettable confusion about universal hashing authenticators. The paper contains misleading claims and misattribution of ideas; describes attacks that apply only beyond the bou...

@StevenHatzakis Right—what I'm responding to here is Maeher's suggestion that it is forbidden to illustrate questions with executable code:
yesterday, by Squeamish Ossifrage
Are we forbidden from illustrating questions with executable code?
yesterday, by Maeher
@SqueamishOssifrage As I understand the scope of the site, yes.
@StevenHatzakis I agree that such a rule seems silly! I'm also not sure we have ever had such a rule on this site, and I don't think we ever should have such a rule on this site. As a guideline, it would be reasonable to say that you don't need to worry about making sure that an illustrative fragment of code is executable—that pseudocode can be a good way to illustrate a computational idea too. But that's a far cry from the frankly baffling rule that Maeher suggested we have.
@MaartenBodewes Most of the brittleness of AES-GCM comes from AES, not from GHASH. The only security problem with GHASH is that fast software implementations are essentially incompatible with side channel security. The data volume bounds on AES-GCM, for example, arise from the use of a permutation instead of a function. Poly1305 has essentially the same security as GHASH; crypto_secretbox_xsalsa20poly1305 is generally a superior alternative to AES-GCM because it uses XSalsa20 instead of AES-CTR.
@FutureSecurity The forger's success probability for a t-bit tag can't be bounded by anything lower than 1/2^t. For an n-block message in a polynomial evaluation MAC like Poly1305 or GHASH, it's n/2^t. At face value, this appears to mean that there's a big security penalty to truncating tags on long messages, and that's the usual story people tell (and that even I've echoed). But that story is a little unsatisfying.
 
Interesting stuff. Although it is tricky for me to read your answer and evaluate it myself, to be honest.
 
7:24 PM
@FutureSecurity Specifically, that story is unsatisfying because the ratio of the bandwidth spent attempting forgeries to the net success probability is not actually much higher for universal hashing MACs: maybe the forgery probability is bounded by 1000/2^t for a single 1000-block message, but it's also about 1000/2^t for a thousand 1-block messages, which costs only a factor of <2 more bandwidth (since there will be only one t-bit tag on the 1000-block message, vs. a thousand t-bit tags).
 
I presume that using CCM or EAX in this case doesn't make a difference w.r.t. security of the MAC (CBC-MAC with defined length messages vs CMAC) when it comes to forgery.
 
@MaartenBodewes Anything involving CBC with a b-bit block cipher will have a security cost of q^2/2^b where q is the number of blocks, so it's no good for more than 2^{b/2} blocks.
 
Yeah, that makes sense of course.
 
Basically, ≪256-bit block ciphers were a historical design mistake, and it seems the world has finally, many decades later, moved on to fixed permutations and systems built out of native PRFs instead of PRPs—except we standardized AES and SHA-2 and they've made it into widely deployed silicon so it's hard to get rid of them.
 
... thinking if not outputting blocks makes a difference or not ... processing ...
No, depends on input message, that's something you don't want to rely on.
 
7:31 PM
(Salsa20, ChaCha, SHA-3, Gimi, etc., are all built out of fixed permutations, and use them as building blocks for PRFs and other objects; very few protocols actually natively use PRPs.)
 
7:51 PM
Roughly, here's the forgery probabilities side by side for q messages, t-bit tag, n-block messages, and a b-bit block cipher, which costs nq + t bits of bandwidth:

CBC-MAC: q/2^t + nq(nq - 1)/(2*2^b)
GHASH: nq/2^t
Ideal: q/2^t

(The forgery probability with AES-GCM also includes an nq(nq - 1)/2^b term because of AES, of course. I'm not separately counting forgery attempts from legitimate messages; it doesn't substantially change the point, since forgeries may as well overwhelm legitimate messages to saturate the bandwidth.)
 
OK, so the conclusion is that the paper was overstating it, but that GHASH / GCM is still worst of the pack?
 
@MaartenBodewes More like: using AES, or a 128-bit block cipher, is the worst. Polynomial evaluation MACs provide ample security and much better performance than CBC-MAC; using a 128-bit block cipher is a mistake.
The paper is just irrelevant daydreaming about how screwed the cryptography is if the adversary improbably succeeds at forgery. But in that case, the adversary has already fooled your application into acting on a forged order, so there's no limit to how screwed your application might be!
 
Interesting. More reasons to up the block size once more (Threefish?) or use a Sponge, possibly.
 
Yes. AES should have been standardized with a 256-bit block size. And we should have chucked block ciphers out the window decades ago, long before they wound up ubiquitously in silicon.
 
Well, on the bright side we haven't seen any too many practical attacks yet, and it is infinitely better than 3DES. Crypto is a new field so we can enjoy thinking of new & better things.
AES is already old too.
 
8:05 PM
(To be fair, GHASH is also bad because of the incompatibility between fast software implementation and side channel resistance! But its cryptanalytic security is plenty.)
Completely unrelated but maybe interesting here:
 
yeah, when I was in the JavaCard forum I pressed for EAX to be included as those platforms don't have 32 bit processors let alone 128 bit vector calculations. CCM was still in there, but it's got usability issues.
Ugh, why does C# always have to re-invent everything that Java does? Span is nice in the sense that it doesn't carry state, but please give me the option to at least write things to a specific index instead of having to Slice endlessly.
 
8:44 PM
@SqueamishOssifrage totally agree! Thanks
 

« first day (2866 days earlier)      last day (1815 days later) »