Commit 9aea359
committed
crypto: seqiv - flag instantiations as FIPS compliant
feature FIPS enablement
commit-author Vladis Dronov <vdronov@redhat.com>
commit e3a5a100a7dcd102b45f6b402f3d8b6a3ceabc1c
commit-source https://gitlab.com/cki-project/kernel-ark.git
JIRA: https://issues.redhat.com/browse/RHEL-54183
Upstream Status: RHEL only
Forwardport of 45e87c3 ("crypto: seqiv - flag instantiations as FIPS
compliant") from C9S. This patch has no chances to be accepted upstream,
see the commit message below.
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>
(cherry picked from commit e3a5a100a7dcd102b45f6b402f3d8b6a3ceabc1c)
Signed-off-by: Sultan Alsawaf <sultan@ciq.com>1 parent 3eaf992 commit 9aea359
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