News for hackers. Stuff that matters.
Re:AES-GCM and breaking it on nonce reuse by jobarion on Wednesday June 12, 2024 @07:56AM (#40657050)
I understand that nonce reuse is catastrophic, but I don't think I understand when it can be abused. Does the attacker have to know which two messages share a nonce? Is knowing that out of N messages, at least one pair shares a nonce already enough?
Re:AES-GCM and breaking it on nonce reuse by frereit on Wednesday June 12, 2024 @07:59AM (#40657072)
Well, the nonce is (usually) public information. It is shared along with the ciphertext, so that the other party can use the same nonce to validate and decrypt the ciphertext. So it is trivial to detect which two messages share a nonce, if any do.
Re:AES-GCM and breaking it on nonce reuse by random_ind_dude on Wednesday June 12, 2024 @04:36PM (#40662805)
>T1 ⊕ T2 = ((U10 ⨂ H3) ⊕ (U11 ⨂ H2) ⊕ (U12 ⨂ H) ⊕ Ek(y0)) ⊕ ((U20 ⨂ H3) ⊕ (U21 ⨂ H2) ⊕ (U22 ⨂ H) ⊕ Ek(y0)) = ((U10 ⊕ U20) ⨂ H4) ⊕ ((U11 ⊕ U21) ⨂ H2) ⊕ ((U12 ⊕ U22) ⨂ H).

Shouldn't the result be ((U10 ⊕ U20) ⨂ H3) ⊕ ((U11 ⊕ U21) ⨂ H2) ⊕ ((U12 ⊕ U22) ⨂ H) ?

Re:AES-GCM and breaking it on nonce reuse by jfyi on Wednesday June 12, 2024 @11:31AM (#40659219)
> I don't think I understand when it can be abused

The same key + nonce generates the same keystream.

The ciphertext is generated by xoring the plaintext with the keystream.

The keystream can be recovered by xoring the ciphertext with the plain text.

To abuse it...

The defender needs to re-use both the same key and nonce.

The attacker needs to have a ciphertext/plaintext pair, know or find the position of that text in the keystream, and needs access to other ciphertexts generated with the same key/nonce.