Add HMAC DRBG from SP800-90
[openssl.git] / fips / rand / fips_rand_lcl.h
index 98407e21ed752393868efda43723cce78bd27768..ce95633b37b926d8666d45c4d8c9ce7d04f5da2e 100644 (file)
@@ -52,6 +52,7 @@
  */
 
 typedef struct drbg_hash_ctx_st DRBG_HASH_CTX;
+typedef struct drbg_hmac_ctx_st DRBG_HMAC_CTX;
 typedef struct drbg_ctr_ctx_st DRBG_CTR_CTX;
 
 /* 888 bits from 10.1 table 2 */
@@ -67,6 +68,14 @@ struct drbg_hash_ctx_st
        unsigned char vtmp[HASH_PRNG_MAX_SEEDLEN];
        };
 
+struct drbg_hmac_ctx_st
+       {
+       const EVP_MD *md;
+       HMAC_CTX hctx;
+       unsigned char K[EVP_MAX_MD_SIZE];
+       unsigned char V[EVP_MAX_MD_SIZE];
+       };
+
 struct drbg_ctr_ctx_st
        {
        AES_KEY ks;
@@ -137,6 +146,7 @@ struct drbg_ctx_st
        union 
                {
                DRBG_HASH_CTX hash;
+               DRBG_HMAC_CTX hmac;
                DRBG_CTR_CTX  ctr;
                } d;
        /* Initialiase PRNG and setup callbacks below */