Commit 1dee5d1
crypto: dh - implement FIPS PCT
feature FIPS enablement
commit-author Vladis Dronov <vdronov@redhat.com>
commit 6030c378bf503f83af9d46e58d43e164fa49eaa5
commit-source https://gitlab.com/cki-project/kernel-ark.git
JIRA: https://issues.redhat.com/browse/RHEL-54183
Upstream Status: RHEL only
Forwardport of 8d6b650 ("crypto: dh - implement FIPS PCT") from C9S.
The below patch from Nicolai is not going to be accepted upstream.
Add a panic on a failed test per FIPS certification requirement.
From: Nicolai Stange <nstange@suse.de>
Date: Tue, 30 Nov 2021 16:51:12 +0100
Subject: [PATCH] crypto: dh - implement FIPS PCT
References: jsc#SLE-21132,bsc#1191256
Patch-mainline: Never, not upstreamable
SP800-56Arev3, 5.6.2.1.4 ("Owner Assurance of Pair-wise Consistency")
requires that a pair-wise consistency check needs to be conducted on a
keypair. A pair-wise consistency test (PCT) is meant to ensure that a
some provided public key is indeed associated with the given private one.
As the kernel's DH implementation always computes the public key from the
private one, this is guaranteed already as per the API. However, in the
course of the certification process, there had been a lengthy discussion
regarding this topic, with the result that a PCT is nonetheless mandatory.
Simply implement a PCT for DH and move on. As mandated by SP800-56Arev3,
5.6.2.1.4, the PCT involves recomputing the public key and comparing it
against the one under test.
Signed-off-by: Nicolai Stange <nstange@suse.de>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
(cherry picked from commit 6030c378bf503f83af9d46e58d43e164fa49eaa5)
Signed-off-by: Sultan Alsawaf <sultan@ciq.com>1 parent 8c814a3 commit 1dee5d1
1 file changed
+25
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
234 | 259 | | |
235 | 260 | | |
236 | 261 | | |
| |||
0 commit comments