Closed chris-wood closed 1 year ago
So there are two nonces involved here:
This is deliberate and I think that we need both.
Right, there are two nonces, but as the diff above suggests, response_nonce
(the one used for diversifying key material) is currently confusingly specified. Is it computed once or twice? I'm not suggesting to remove the aead_nonce
.
Oh, I see. I need more sleep. Yes.
The draft reads:
And then:
I don't think the intended effect is to have
response_nonce
be different in the header and in the key derivation step. The current text seems to imply that the header first carries a randomly generatedresponse_nonce
, and then each subsequent response chunk is encrypted using a differentresponse_nonce
.Probably the simple thing to do here is just drop the second
response_nonce
derivation, like so: