Skip to content

Commit 7c30d3c

Browse files
authored
Merge pull request #1500 from microsoft/dev/dagood/macos-fips-changleog
Add version notes for macOS darwincrypto
2 parents dddedbf + 9c20af4 commit 7c30d3c

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

eng/doc/fips/README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ In addition to that, the boringcrypto flag also provides a mechanism to restrict
2727

2828
The Microsoft Go fork modifies the Go runtime to implement several crypto primitives using cgo to call into a platform-provided cryptographic library rather than use the standard Go crypto implementations. This allows Go programs to use a platform-provided FIPS 140-2 certified crypto library.
2929

30-
On Linux, the fork uses [OpenSSL](https://www.openssl.org/) through the [golang-fips/openssl] module in Go 1.21+ and the [go-crypto-openssl] module in earlier versions. On Windows, [CNG](https://docs.microsoft.com/en-us/windows/win32/seccng/about-cng), using [go-crypto-winnative]. On macOS, [CommonCrypto](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/Common%20Crypto.3cc.html) and [CryptoKit](https://developer.apple.com/documentation/cryptokit) using [go-crypto-darwin]. Similar to BoringSSL, certain OpenSSL, CNG and CommonCrypto/CryptoKit versions are FIPS 140-2 certified.
30+
On Linux, the fork uses [OpenSSL](https://www.openssl.org/) through the [golang-fips/openssl] module in Go 1.21+ and the [go-crypto-openssl] module in earlier versions. On Windows, [CNG](https://docs.microsoft.com/en-us/windows/win32/seccng/about-cng), using [go-crypto-winnative]. Since 1.24, on macOS, [CommonCrypto](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/Common%20Crypto.3cc.html) and [CryptoKit](https://developer.apple.com/documentation/cryptokit) using [go-crypto-darwin]. Similar to BoringSSL, certain OpenSSL, CNG and CommonCrypto/CryptoKit versions are FIPS 140-2 certified.
3131

3232
It is important to note that an application built with Microsoft's Go toolchain and running in FIPS compatible mode is not FIPS compliant _per-se_. It is the responsibility of the application development team to use FIPS-compliant crypto primitives and workflows. The modified crypto runtime will fall back to Go standard library crypto if it cannot provide a FIPS-compliant implementation, e.g. when hashing a message using `crypto/md5` hashes or when using an AES-GCM cipher with a non-standard nonce size.
3333

@@ -60,7 +60,7 @@ There are typically two goals that lead to this document. Creating a FIPS compli
6060
| --- | --- | --- | --- |
6161
| Default | Default | Not compliant | Crypto usage is not FIPS compliant. |
6262
| `GOEXPERIMENT=systemcrypto` | Default | Compliant | Can be used to create a compliant app. FIPS mode is determined by system-wide configuration. Make sure you are familiar with your platform's system-wide FIPS switch, described in [Usage: Runtime](#usage-runtime). |
63-
| `GOEXPERIMENT=systemcrypto` | `GOFIPS=1` | Compliant | Can be used to create a compliant app. Depending on platform, the app either enables FIPS mode or ensures it is already enabled. The app panics if there is a problem. See [Usage: Runtime](#usage-runtime). |
63+
| `GOEXPERIMENT=systemcrypto` | `GOFIPS=1` | Compliant | Can be used to create a compliant app. Depending on platform, the app enables FIPS mode, ensures it is already enabled, or doesn't do any additional checks. The app panics if there is a problem. See [Usage: Runtime](#usage-runtime). |
6464
| `GOEXPERIMENT=systemcrypto` | `GOFIPS=0` | Compliant | Crypto usage is unlikely to be FIPS compliant. The exact behavior of `GOFIPS=0` varies per platform. See [Usage: Runtime](#usage-runtime). |
6565
| `GOEXPERIMENT=systemcrypto` | `GO_OPENSSL_VERSION_OVERRIDE=1.1.1k-fips` | Compliant | Can be used to create a compliant app. If the app is built for Linux, `systemcrypto` chooses `opensslcrypto`, and the environment variable causes it to load `libcrypto.so.1.1.1k-fips` instead of using the automatic search behavior. This environment variable has no effect with `cngcrypto`. |
6666
| `GOEXPERIMENT=systemcrypto` and `-tags=requirefips` | Default | Compliant | Can be used to create a compliant app. The behavior is the same as `GOFIPS=1`, but no runtime configuration is necessary. See [the `requirefips` section](#build-option-to-require-fips-mode) for more information on when this "locked-in" approach may be useful rather than the flexible approach. |
@@ -87,7 +87,7 @@ The `GOEXPERIMENT` environment variable is used at build time to select a crypto
8787
- Prior to Go 1.21, this alias is not available and the backend must be selected manually
8888
- `opensslcrypto` selects OpenSSL, for Linux
8989
- `cngcrypto` selects CNG, for Windows
90-
- `darwincrypto` selects CommonCrypto & CryptoKit for macOS
90+
- Since 1.24, `darwincrypto` selects CommonCrypto & CryptoKit for macOS
9191
- `boringcrypto` selects the upstream BoringCrypto backend, which is **not supported nor compliant**
9292
- If no option is selected, Go standard library cryptography is used.
9393

@@ -99,7 +99,8 @@ The options are exclusive and must not be enabled at the same time as one anothe
9999
| --- | --- | --- |
100100
| Linux | `opensslcrypto` | OpenSSL |
101101
| Windows | `cngcrypto` | CNG |
102-
| macOS | `darwincrypto` | CommonCrypto & CryptoKit |
102+
| macOS (since 1.24) | `darwincrypto` | CommonCrypto & CryptoKit |
103+
| macOS (prior to 1.24) | N/A, build error | N/A |
103104

104105
The crypto backend selection must match the target platform. In a cross-build scenario, such as using Linux to build an app that will run on Windows, `GOOS=windows GOEXPERIMENT=systemcrypto` will correctly select `cngcrypto`. Prior to Go 1.21, the selection must be made manually: `GOOS=windows GOEXPERIMENT=cngcrypto`.
105106

@@ -234,6 +235,8 @@ For testing purposes, Windows FIPS policy can be enabled via the registry key `H
234235

235236
CommonCrypo/CrytoKit is FIPS compliant by default. This means that regardless of which mode you set `GOFIPS` to, the cryptographic functions will always be FIPS-enabled.
236237

238+
Prior to 1.24, CommonCrypto/CryptoKit is not used by Microsoft Go.
239+
237240
## Usage: Extra configuration options
238241

239242
### Build option to require FIPS mode
@@ -402,6 +405,10 @@ A program running in FIPS mode can claim it is using a FIPS-certified cryptograp
402405

403406
This list of major changes is intended for quick reference and for access to historical information about versions that are no longer supported. The behavior of all in-support versions are documented in the sections above with notes for version-specific differences where necessary.
404407

408+
### Go 1.24 (Feb 2025)
409+
410+
- Introduces macOS crypto backend `darwincrypto`.
411+
405412
### Go [1.22.9-2](https://github.com/microsoft/go/releases/tag/v1.22.9-2) and [1.23.3-2](https://github.com/microsoft/go/releases/tag/v1.23.3-2) (Dec 2024)
406413

407414
- Adds compatibility with changes that [Azure Linux] 3 made to the OpenSSL configuration, specifically the change to use [SCOSSL](https://github.com/microsoft/SymCrypt-OpenSSL). The SCOSSL-related Azure Linux packages must also be up to date for compatibility, at least `SymCrypt-103.6.0-1` and `SymCrypt-OpenSSL-1.6.1-1`.

0 commit comments

Comments
 (0)