Skip to content

Commit de30be3

Browse files
authored
feat: allow P-521 curve in fips mode (#318)
1 parent 257bc2f commit de30be3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

transport/tlscommon/types_fips.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ func init() {
3737
supportedCipherSuites[i] = cipherName
3838
}
3939
}
40-
// only allow P256, P384.
40+
// Elliptic curves approved for use in ECDSA are specified in SP 800-186,
41+
// as implemented in FIPS 186-5.
42+
// Based on NIST SP 800-186 section 3 and SP 800-56A Rev.3
43+
// only allows P-256, P-384, P-521
4144
for name, curveType := range tlsCurveTypes {
4245
switch tls.CurveID(curveType) {
43-
case tls.CurveP256, tls.CurveP384:
46+
case tls.CurveP256, tls.CurveP384, tls.CurveP521:
4447
supportedCurveTypes[curveType] = name
4548
}
4649
}

0 commit comments

Comments
 (0)