You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: eng/doc/fips/README.md
+11-4
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ In addition to that, the boringcrypto flag also provides a mechanism to restrict
27
27
28
28
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.
29
29
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.
31
31
32
32
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.
33
33
@@ -60,7 +60,7 @@ There are typically two goals that lead to this document. Creating a FIPS compli
60
60
| --- | --- | --- | --- |
61
61
| Default | Default | Not compliant | Crypto usage is not FIPS compliant. |
62
62
|`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). |
64
64
|`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). |
65
65
|`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`. |
66
66
|`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
87
87
- Prior to Go 1.21, this alias is not available and the backend must be selected manually
88
88
-`opensslcrypto` selects OpenSSL, for Linux
89
89
-`cngcrypto` selects CNG, for Windows
90
-
-`darwincrypto` selects CommonCrypto & CryptoKit for macOS
90
+
-Since 1.24, `darwincrypto` selects CommonCrypto & CryptoKit for macOS
91
91
-`boringcrypto` selects the upstream BoringCrypto backend, which is **not supported nor compliant**
92
92
- If no option is selected, Go standard library cryptography is used.
93
93
@@ -99,7 +99,8 @@ The options are exclusive and must not be enabled at the same time as one anothe
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`.
105
106
@@ -234,6 +235,8 @@ For testing purposes, Windows FIPS policy can be enabled via the registry key `H
234
235
235
236
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.
236
237
238
+
Prior to 1.24, CommonCrypto/CryptoKit is not used by Microsoft Go.
239
+
237
240
## Usage: Extra configuration options
238
241
239
242
### 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
402
405
403
406
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.
404
407
408
+
### Go 1.24 (Feb 2025)
409
+
410
+
- Introduces macOS crypto backend `darwincrypto`.
411
+
405
412
### 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)
406
413
407
414
- 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