diff options
author | Jarod Wilson <jarod@redhat.com> | 2009-05-04 07:44:50 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-06-02 00:04:38 -0400 |
commit | 7647d6ce2077d9e1c3d72359f6b4492be129cfe8 (patch) | |
tree | f4d961ef1cd4c6d69c87e5090dba7a631bc004a1 /crypto/testmgr.h | |
parent | 5d667322a25ab4ecb91176db118fd663fee4da35 (diff) |
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.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 5add65196a98..13d5a61d0e77 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h | |||
@@ -70,6 +70,18 @@ struct aead_testvec { | |||
70 | unsigned short rlen; | 70 | unsigned short rlen; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | struct cprng_testvec { | ||
74 | char *key; | ||
75 | char *dt; | ||
76 | char *v; | ||
77 | char *result; | ||
78 | unsigned char klen; | ||
79 | unsigned short dtlen; | ||
80 | unsigned short vlen; | ||
81 | unsigned short rlen; | ||
82 | unsigned short loops; | ||
83 | }; | ||
84 | |||
73 | static char zeroed_string[48]; | 85 | static char zeroed_string[48]; |
74 | 86 | ||
75 | /* | 87 | /* |