Closed Bug 1818235 Opened 2 years ago Closed 2 years ago

DTLS1.3 Modification of the IV generation function

Categories

(NSS :: Libraries, defect, P4)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: anna.weine, Assigned: anna.weine)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It seems that there is a difference between the AEAD Nonce generation (https://searchfox.org/mozilla-central/source/security/nss/lib/ssl/tls13con.c#5671).

Let's call the extracted nonce as IV, and the buffer to randomize it - Nonce.
For WolfSSL implementation the nonce is presented as a sequence number, for us it includes epoch etc.
See RFC 8446: 5.3. Per-Record Nonce

Found during the interoperability testing with WolfSSL.

Attachment #9319217 - Attachment description: WIP: Bug 1818235 - DTLS1.3 Nonce consists only of a sequence number → Bug 1818235 - DTLS1.3 Nonce consists only of a sequence number
Attachment #9319217 - Attachment description: Bug 1818235 - DTLS1.3 Nonce consists only of a sequence number → WIP: Bug 1818235 - DTLS1.3 Nonce consists only of a sequence number

Actually, the required modifications seem to be more complicated than I expected:
it seems that we need to check for the epoch as well :

 ivOffset = tls13_SetupAeadIv(IS_DTLS_1_OR_12(ss) || cwSpec->epoch == 1, ivOut, cwSpec->keyMaterial.iv,
                                     ivOffset, ivLen, cwSpec->epoch);

and update the nonce offset for the DTLS1.3 case.

Attachment #9319217 - Attachment description: WIP: Bug 1818235 - DTLS1.3 Nonce consists only of a sequence number → Bug 1818235 - DTLS1.3 Nonce consists only of a sequence number

The severity field is not set for this bug.
:beurdouche, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bbeurdouche)
Flags: needinfo?(bbeurdouche)
Severity: -- → S4
Priority: -- → P4

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:nkulatova, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.

Flags: needinfo?(nkulatova)
Flags: needinfo?(djackson)

We plan to land all the DTLS1.3 bugs at once.

Flags: needinfo?(nkulatova)
Flags: needinfo?(djackson)
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: