rand: set up EVP and DRBG infrastructure for RAND from providers.
[openssl.git] / include / openssl / core_numbers.h
index ce8306e5bcdcdcee514b4e45a3b58a140de8c461..acc758e4628d6a8bceaa747bea4ece95a22219ab 100644 (file)
@@ -359,24 +359,28 @@ OSSL_CORE_MAKE_FUNC(int, OP_kdf_set_ctx_params,
 # define OSSL_FUNC_RAND_GET_CTX_PARAMS               15
 # define OSSL_FUNC_RAND_SET_CTX_PARAMS               16
 # define OSSL_FUNC_RAND_SET_CALLBACKS                17
+# define OSSL_FUNC_RAND_VERIFY_ZEROIZATION           18
 
 OSSL_CORE_MAKE_FUNC(void *, OP_rand_newctx,
-                    (void *provctx, int secure, unsigned int df, void *parent,
+                    (void *provctx, int secure, void *parent,
                     const OSSL_DISPATCH *parent_calls))
 OSSL_CORE_MAKE_FUNC(void, OP_rand_freectx, (void *vctx))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_instantiate,
-                    (void *vdrbg, int strength, int prediction_resistance,
+                    (void *vdrbg, unsigned int strength,
+                     int prediction_resistance,
                      const unsigned char *pstr, size_t pstr_len))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_uninstantiate, (void *vdrbg))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_generate,
                     (void *vctx, unsigned char *out, size_t outlen,
-                     int strength, int prediction_resistance,
+                     unsigned int strength, int prediction_resistance,
                      const unsigned char *addin, size_t addin_len))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_reseed,
                     (void *vctx, int prediction_resistance,
+                     const unsigned char *ent, size_t ent_len,
                      const unsigned char *addin, size_t addin_len))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_nonce,
-                    (void *vctx, unsigned char *out, size_t outlen))
+OSSL_CORE_MAKE_FUNC(size_t, OP_rand_nonce,
+                    (void *vctx, unsigned char *out, int strength,
+                     size_t min_noncelen, size_t max_noncelen))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_set_callbacks,
                     (void *vctx,
                      OSSL_CALLBACK *get_entropy, OSSL_CALLBACK *cleanup_entropy,
@@ -392,6 +396,8 @@ OSSL_CORE_MAKE_FUNC(int, OP_rand_get_ctx_params,
                     (void *vctx, OSSL_PARAM params[]))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_set_ctx_params,
                     (void *vctx, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_verify_zeroization,
+                    (void *vctx))
 
 /*-
  * Key management