summaryrefslogtreecommitdiff
path: root/crypto/testmgr.h
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2009-05-04 19:44:50 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-06-02 14:04:38 +1000
commit50b7721aba4c9044c2a0e04d0f34700a92377133 (patch)
tree70ca4b1f4d4e375f292bcda89172c81aaee39654 /crypto/testmgr.h
parent7a7475c0d345bc9889fc385ae89293d62e0b89fe (diff)
downloadlinux-crypto-50b7721aba4c9044c2a0e04d0f34700a92377133.tar.gz
linux-crypto-50b7721aba4c9044c2a0e04d0f34700a92377133.zip
crypto: testmgr - Add infrastructure for ansi_cprng self-tests
Add some necessary infrastructure to make it possible to run self-tests for ansi_cprng. The bits are likely very specific to the ANSI X9.31 CPRNG in AES mode, and thus perhaps should be named more specifically if/when we grow additional CPRNG support... Successfully tested against the cryptodev-2.6 tree and a Red Hat Enterprise Linux 5.x kernel with the follow-on patch that adds the actual test vectors. Signed-off-by: Jarod Wilson <jarod@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/testmgr.h')
-rw-r--r--crypto/testmgr.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 5add6519..13d5a61d 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -70,6 +70,18 @@ struct aead_testvec {
unsigned short rlen;
};
+struct cprng_testvec {
+ char *key;
+ char *dt;
+ char *v;
+ char *result;
+ unsigned char klen;
+ unsigned short dtlen;
+ unsigned short vlen;
+ unsigned short rlen;
+ unsigned short loops;
+};
+
static char zeroed_string[48];
/*