Commit 7e6a23c
committed
Add forward port of centos-stream-9 commit 45e87c3.
Required by lab.
commit 45e87c3
Author: Vladis Dronov <vdronov@redhat.com>
Date: Wed Jul 27 15:41:02 2022 +0200
crypto: seqiv - flag instantiations as FIPS compliant
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2107596
Upstream Status: RHEL only
Author: Nicolai Stange <nstange@suse.de>
crypto: seqiv - flag instantiations as FIPS compliant
For gcm(aes) with external IV generation, FIPS 140-3 requires the
verification of all external IV generation operations in order to ensure
the uniqueness of the IV (see IG C.H). This is being deemed unfeasible and
thus, only internal IV generation, i.e. wrapping gcm(aes) with seqiv(),
can effectively be considered as approved.
The standard approach would be to disallow plain gcm(aes) and to only
allow seqiv(gcm(aes)) in FIPS mode. However, there are quite some plain
gcm(aes) usage sites in the kernel: a quick grep reveals samba, macsec,
ceph, mac80211, tipc, tls, etc. and breaking these in FIPS mode would be
highly undesirable. It might perhaps be possible to convert some of these
to seqiv(gcm(aes)), but for some others it might be entirely impossible due
to e.g. protocol constraints.
For the time being, an alternative approach has been proposed as a
workaround: make seqiv() set a new flag, CRYPTO_TFM_FIPS_COMPLIANCE, on the
transforms and document that in the particular case of gcm(aes), callers
must check for this flag in order to determine FIPS compliance.
Implement this.
Signed-off-by: Nicolai Stange <nstange@suse.de>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Jeremy Allison <jallison@ciq.com>1 parent 3eaf992 commit 7e6a23c
2 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
135 | 148 | | |
136 | 149 | | |
137 | 150 | | |
| |||
149 | 162 | | |
150 | 163 | | |
151 | 164 | | |
152 | | - | |
| 165 | + | |
153 | 166 | | |
154 | 167 | | |
155 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments