Skip to content

Commit

Permalink
Merge pull request #1125 from microsoft/dev/qmuntal/go120tls13
Browse files Browse the repository at this point in the history
[release-branch.go1.20] Support TLS 1.3 in fipstls mode
  • Loading branch information
qmuntal authored Feb 5, 2024
2 parents 947ab30 + 9ecc1ca commit 3fffba3
Show file tree
Hide file tree
Showing 4 changed files with 365 additions and 13 deletions.
26 changes: 15 additions & 11 deletions eng/doc/fips/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ The Go crypto documentation is available online at https://pkg.go.dev/crypto.
- [crypto/sha512](#cryptosha512)
- [func New](#func-new-3)
- [func New384](#func-new384)
- [func New512_224](#func-new512_224)
- [func New512_256](#func-new512_256)
- [func New512\_224](#func-new512_224)
- [func New512\_256](#func-new512_256)
- [func Sum384](#func-sum384)
- [func Sum512](#func-sum512)
- [func Sum512_224](#func-sum512_224)
- [func Sum512_256](#func-sum512_256)
- [func Sum512\_224](#func-sum512_224)
- [func Sum512\_256](#func-sum512_256)
- [crypto/rsa](#cryptorsa)
- [func DecryptOAEP](#func-decryptoaep)
- [func DecryptPKCS1v15](#func-decryptpkcs1v15)
Expand Down Expand Up @@ -1235,18 +1235,22 @@ Package tls will automatically use FIPS compliant primitives implemented in othe

When using TLS in FIPS-only mode the TLS handshake has the following restrictions:

- TLS versions: `tls.VersionTLS12`
- TLS versions:
- `tls.VersionTLS12`
- `tls.VersionTLS13`
- ECDSA elliptic curves:
- `tls.CurveP256`
- `tls.CurveP384`
- `tls.CurveP521`
- Cipher suites:
- `tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256`
- `tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384`
- `tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256`
- `tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384`
- `tls.TLS_RSA_WITH_AES_128_GCM_SHA256`
- `tls.TLS_RSA_WITH_AES_256_GCM_SHA384`
- TLS 1.2:
- `tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256`
- `tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384`
- `tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256`
- `tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384`
- TLS 1.3:
- `tls.TLS_AES_128_GCM_SHA256`
- `tls.TLS_AES_256_GCM_SHA384`
- x509 certificate public key:
- `rsa.PublicKey` with a bit length of 2048 or 3072. Bit length of 4096 is still not supported, see [this issue](https://github.com/golang/go/issues/41147) for more info.
- `ecdsa.PublicKey` with a supported elliptic curve.
Expand Down
2 changes: 1 addition & 1 deletion patches/0004-Add-BoringSSL-crypto-backend.patch
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ index 00000000000000..ba4f290a8e394d
+
+func NewAESCipher(key []byte) (cipher.Block, error) { return boring.NewAESCipher(key) }
+func NewGCMTLS(c cipher.Block) (cipher.AEAD, error) { return boring.NewGCMTLS(c) }
+func NewGCMTLS13(c cipher.Block) (cipher.AEAD, error) { return boring.NewGCMTLS13(c) }
+func NewGCMTLS13(c cipher.Block) (cipher.AEAD, error) { panic("cryptobackend: not available") }
+
+type PublicKeyECDSA = boring.PublicKeyECDSA
+type PrivateKeyECDSA = boring.PrivateKeyECDSA
Expand Down
Loading

0 comments on commit 3fffba3

Please sign in to comment.