Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions u_parrots.go
Original file line number Diff line number Diff line change
Expand Up @@ -3339,7 +3339,8 @@ func generateRandomizedSpec(
points := SupportedPointsExtension{SupportedPoints: []byte{pointFormatUncompressed}}

curveIDs := []CurveID{}
if r.FlipWeightedCoin(id.Weights.CurveIDs_Append_X25519) && p.TLSVersMax == VersionTLS13 {
includeX25519MLKEM768 := r.FlipWeightedCoin(id.Weights.CurveIDs_Append_X25519) && p.TLSVersMax == VersionTLS13
if includeX25519MLKEM768 {
curveIDs = append(curveIDs, X25519MLKEM768)
}
if r.FlipWeightedCoin(id.Weights.CurveIDs_Append_X25519) || p.TLSVersMax == VersionTLS13 {
Expand Down Expand Up @@ -3399,9 +3400,11 @@ func generateRandomizedSpec(
if r.FlipWeightedCoin(id.Weights.KeyShare_Append_RandomGroups) {
ks.KeyShares = append(ks.KeyShares, KeyShare{Group: CurveP256})
}
if r.FlipWeightedCoin(id.Weights.KeyShare_Append_RandomGroups) {
ks.KeyShares = append([]KeyShare{{Group: X25519MLKEM768}}, ks.KeyShares...)
}
// Preserve PRNG progression for existing randomized seeds.
_ = r.FlipWeightedCoin(id.Weights.KeyShare_Append_RandomGroups)
}
if includeX25519MLKEM768 {
ks.KeyShares = append([]KeyShare{{Group: X25519MLKEM768}}, ks.KeyShares...)
}
pskExchangeModes := PSKKeyExchangeModesExtension{[]uint8{pskModeDHE}}
supportedVersionsExt := SupportedVersionsExtension{
Expand Down