Commit Graph

2 Commits

Author SHA1 Message Date
Eric Biggers
260c9e9558 ANDROID: fips140: add dump_jitterentropy command to fips140_lab_util
For the entropy analysis, we must provide some output from the Jitter
RNG: a large amount of output from one instance, and a smaller amount of
output from each of a certain number of instances.

The original plan was to use a build of the userspace jitterentropy
library that matches the kernel's jitterentropy_rng as closely as
possible.  However, it's now being requested that the output be gotten
from the kernel instead.

Now that fips140_lab_util depends on AF_ALG anyway, it's straightforward
to dump output from jitterentropy_rng instances using AF_ALG.
Therefore, add a command dump_jitterentropy which supports this.

Bug: 188620248
Change-Id: I78eb26250e88f2fc28fc44aa201acbe5b84df8bb
Signed-off-by: Eric Biggers <ebiggers@google.com>
(cherry picked from commit dc015032666ece133065b7fea73f5709f735c9b0)
2023-01-06 13:19:15 +00:00
Eric Biggers
1ced87f1a9 ANDROID: fips140: add fips140_lab_util program
Add a sample program that supports various tests that the FIPS
certification lab is required to do on fips140.ko.  To do its work it
uses AF_ALG, as well as the /dev/fips140 device node provided by a build
of fips140.ko with CONFIG_CRYPTO_FIPS140_MOD_EVAL_TESTING enabled.

Original commits from android12-5.10:
  * 109f31ac23 ("ANDROID: fips140: add userspace interface for evaluation testing")
  * a481d43521 ("ANDROID: fips140: refactor and rename fips140_lab_test")
  * 3a624c9ccd ("ANDROID: fips140: add show_invalid_inputs command to fips140_lab_util")

Bug: 153614920
Bug: 188620248
Change-Id: Ide1875f39d439c3955d03a5f41160382544d47bd
Signed-off-by: Eric Biggers <ebiggers@google.com>
2022-03-15 21:24:22 +00:00