Latest update.
This commit is contained in:
@@ -0,0 +1,324 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <openssl/params.h>
|
||||
#include <openssl/core_numbers.h>
|
||||
#include <openssl/core_names.h>
|
||||
#include <openssl/evp.h>
|
||||
#include "internal/cryptlib.h"
|
||||
#include "crypto/modes.h"
|
||||
|
||||
#define MAXCHUNK ((size_t)1 << (sizeof(long) * 8 - 2))
|
||||
#define MAXBITCHUNK ((size_t)1 << (sizeof(size_t) * 8 - 4))
|
||||
|
||||
#define GENERIC_BLOCK_SIZE 16
|
||||
#define IV_STATE_UNINITIALISED 0 /* initial state is not initialized */
|
||||
#define IV_STATE_BUFFERED 1 /* iv has been copied to the iv buffer */
|
||||
#define IV_STATE_COPIED 2 /* iv has been copied from the iv buffer */
|
||||
#define IV_STATE_FINISHED 3 /* the iv has been used - so don't reuse it */
|
||||
|
||||
#define PROV_CIPHER_FUNC(type, name, args) typedef type (* OSSL_##name##_fn)args
|
||||
|
||||
typedef struct prov_cipher_hw_st PROV_CIPHER_HW;
|
||||
typedef struct prov_cipher_ctx_st PROV_CIPHER_CTX;
|
||||
|
||||
typedef int (PROV_CIPHER_HW_FN)(PROV_CIPHER_CTX *dat, unsigned char *out,
|
||||
const unsigned char *in, size_t len);
|
||||
|
||||
struct prov_cipher_ctx_st {
|
||||
block128_f block;
|
||||
union {
|
||||
cbc128_f cbc;
|
||||
ctr128_f ctr;
|
||||
ecb128_f ecb;
|
||||
} stream;
|
||||
|
||||
unsigned int mode;
|
||||
size_t keylen; /* key size (in bytes) */
|
||||
size_t ivlen;
|
||||
size_t blocksize;
|
||||
size_t bufsz; /* Number of bytes in buf */
|
||||
unsigned int pad : 1; /* Whether padding should be used or not */
|
||||
unsigned int enc : 1; /* Set to 1 for encrypt, or 0 otherwise */
|
||||
unsigned int iv_set : 1; /* Set when the iv is copied to the iv/oiv buffers */
|
||||
|
||||
/*
|
||||
* num contains the number of bytes of |iv| which are valid for modes that
|
||||
* manage partial blocks themselves.
|
||||
*/
|
||||
unsigned int num;
|
||||
uint64_t flags;
|
||||
|
||||
/* The original value of the iv */
|
||||
unsigned char oiv[GENERIC_BLOCK_SIZE];
|
||||
/* Buffer of partial blocks processed via update calls */
|
||||
unsigned char buf[GENERIC_BLOCK_SIZE];
|
||||
unsigned char iv[GENERIC_BLOCK_SIZE];
|
||||
const PROV_CIPHER_HW *hw; /* hardware specific functions */
|
||||
const void *ks; /* Pointer to algorithm specific key data */
|
||||
OPENSSL_CTX *libctx;
|
||||
};
|
||||
|
||||
struct prov_cipher_hw_st {
|
||||
int (*init)(PROV_CIPHER_CTX *dat, const uint8_t *key, size_t keylen);
|
||||
PROV_CIPHER_HW_FN *cipher;
|
||||
void (*copyctx)(PROV_CIPHER_CTX *dst, const PROV_CIPHER_CTX *src);
|
||||
};
|
||||
|
||||
OSSL_OP_cipher_encrypt_init_fn cipher_generic_einit;
|
||||
OSSL_OP_cipher_decrypt_init_fn cipher_generic_dinit;
|
||||
OSSL_OP_cipher_update_fn cipher_generic_block_update;
|
||||
OSSL_OP_cipher_final_fn cipher_generic_block_final;
|
||||
OSSL_OP_cipher_update_fn cipher_generic_stream_update;
|
||||
OSSL_OP_cipher_final_fn cipher_generic_stream_final;
|
||||
OSSL_OP_cipher_cipher_fn cipher_generic_cipher;
|
||||
OSSL_OP_cipher_get_ctx_params_fn cipher_generic_get_ctx_params;
|
||||
OSSL_OP_cipher_set_ctx_params_fn cipher_generic_set_ctx_params;
|
||||
OSSL_OP_cipher_gettable_params_fn cipher_generic_gettable_params;
|
||||
OSSL_OP_cipher_gettable_ctx_params_fn cipher_generic_gettable_ctx_params;
|
||||
OSSL_OP_cipher_settable_ctx_params_fn cipher_generic_settable_ctx_params;
|
||||
OSSL_OP_cipher_set_ctx_params_fn cipher_var_keylen_set_ctx_params;
|
||||
OSSL_OP_cipher_settable_ctx_params_fn cipher_var_keylen_settable_ctx_params;
|
||||
OSSL_OP_cipher_gettable_ctx_params_fn cipher_aead_gettable_ctx_params;
|
||||
OSSL_OP_cipher_settable_ctx_params_fn cipher_aead_settable_ctx_params;
|
||||
int cipher_generic_get_params(OSSL_PARAM params[], unsigned int md,
|
||||
unsigned long flags,
|
||||
size_t kbits, size_t blkbits, size_t ivbits);
|
||||
void cipher_generic_initkey(void *vctx, size_t kbits, size_t blkbits,
|
||||
size_t ivbits, unsigned int mode, uint64_t flags,
|
||||
const PROV_CIPHER_HW *hw, void *provctx);
|
||||
|
||||
#define IMPLEMENT_generic_cipher_func(alg, UCALG, lcmode, UCMODE, flags, kbits,\
|
||||
blkbits, ivbits, typ) \
|
||||
const OSSL_DISPATCH alg##kbits##lcmode##_functions[] = { \
|
||||
{ OSSL_FUNC_CIPHER_NEWCTX, \
|
||||
(void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \
|
||||
{ OSSL_FUNC_CIPHER_FREECTX, (void (*)(void)) alg##_freectx }, \
|
||||
{ OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void)) alg##_dupctx }, \
|
||||
{ OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))cipher_generic_einit }, \
|
||||
{ OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void))cipher_generic_dinit }, \
|
||||
{ OSSL_FUNC_CIPHER_UPDATE, (void (*)(void))cipher_generic_##typ##_update },\
|
||||
{ OSSL_FUNC_CIPHER_FINAL, (void (*)(void))cipher_generic_##typ##_final }, \
|
||||
{ OSSL_FUNC_CIPHER_CIPHER, (void (*)(void))cipher_generic_cipher }, \
|
||||
{ OSSL_FUNC_CIPHER_GET_PARAMS, \
|
||||
(void (*)(void)) alg##_##kbits##_##lcmode##_get_params }, \
|
||||
{ OSSL_FUNC_CIPHER_GET_CTX_PARAMS, \
|
||||
(void (*)(void))cipher_generic_get_ctx_params }, \
|
||||
{ OSSL_FUNC_CIPHER_SET_CTX_PARAMS, \
|
||||
(void (*)(void))cipher_generic_set_ctx_params }, \
|
||||
{ OSSL_FUNC_CIPHER_GETTABLE_PARAMS, \
|
||||
(void (*)(void))cipher_generic_gettable_params }, \
|
||||
{ OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS, \
|
||||
(void (*)(void))cipher_generic_gettable_ctx_params }, \
|
||||
{ OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS, \
|
||||
(void (*)(void))cipher_generic_settable_ctx_params }, \
|
||||
{ 0, NULL } \
|
||||
};
|
||||
|
||||
#define IMPLEMENT_var_keylen_cipher_func(alg, UCALG, lcmode, UCMODE, flags, \
|
||||
kbits, blkbits, ivbits, typ) \
|
||||
const OSSL_DISPATCH alg##kbits##lcmode##_functions[] = { \
|
||||
{ OSSL_FUNC_CIPHER_NEWCTX, \
|
||||
(void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \
|
||||
{ OSSL_FUNC_CIPHER_FREECTX, (void (*)(void)) alg##_freectx }, \
|
||||
{ OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void)) alg##_dupctx }, \
|
||||
{ OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))cipher_generic_einit }, \
|
||||
{ OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void))cipher_generic_dinit }, \
|
||||
{ OSSL_FUNC_CIPHER_UPDATE, (void (*)(void))cipher_generic_##typ##_update },\
|
||||
{ OSSL_FUNC_CIPHER_FINAL, (void (*)(void))cipher_generic_##typ##_final }, \
|
||||
{ OSSL_FUNC_CIPHER_CIPHER, (void (*)(void))cipher_generic_cipher }, \
|
||||
{ OSSL_FUNC_CIPHER_GET_PARAMS, \
|
||||
(void (*)(void)) alg##_##kbits##_##lcmode##_get_params }, \
|
||||
{ OSSL_FUNC_CIPHER_GET_CTX_PARAMS, \
|
||||
(void (*)(void))cipher_generic_get_ctx_params }, \
|
||||
{ OSSL_FUNC_CIPHER_SET_CTX_PARAMS, \
|
||||
(void (*)(void))cipher_var_keylen_set_ctx_params }, \
|
||||
{ OSSL_FUNC_CIPHER_GETTABLE_PARAMS, \
|
||||
(void (*)(void))cipher_generic_gettable_params }, \
|
||||
{ OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS, \
|
||||
(void (*)(void))cipher_generic_gettable_ctx_params }, \
|
||||
{ OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS, \
|
||||
(void (*)(void))cipher_var_keylen_settable_ctx_params }, \
|
||||
{ 0, NULL } \
|
||||
};
|
||||
|
||||
|
||||
#define IMPLEMENT_generic_cipher_genfn(alg, UCALG, lcmode, UCMODE, flags, \
|
||||
kbits, blkbits, ivbits, typ) \
|
||||
static OSSL_OP_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \
|
||||
static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
|
||||
{ \
|
||||
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, flags, \
|
||||
kbits, blkbits, ivbits); \
|
||||
} \
|
||||
static OSSL_OP_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \
|
||||
static void * alg##_##kbits##_##lcmode##_newctx(void *provctx) \
|
||||
{ \
|
||||
PROV_##UCALG##_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \
|
||||
if (ctx != NULL) { \
|
||||
cipher_generic_initkey(ctx, kbits, blkbits, ivbits, \
|
||||
EVP_CIPH_##UCMODE##_MODE, flags, \
|
||||
PROV_CIPHER_HW_##alg##_##lcmode(kbits), NULL); \
|
||||
} \
|
||||
return ctx; \
|
||||
} \
|
||||
|
||||
#define IMPLEMENT_generic_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, \
|
||||
blkbits, ivbits, typ) \
|
||||
IMPLEMENT_generic_cipher_genfn(alg, UCALG, lcmode, UCMODE, flags, kbits, \
|
||||
blkbits, ivbits, typ) \
|
||||
IMPLEMENT_generic_cipher_func(alg, UCALG, lcmode, UCMODE, flags, kbits, \
|
||||
blkbits, ivbits, typ)
|
||||
|
||||
#define IMPLEMENT_var_keylen_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, \
|
||||
blkbits, ivbits, typ) \
|
||||
IMPLEMENT_generic_cipher_genfn(alg, UCALG, lcmode, UCMODE, flags, kbits, \
|
||||
blkbits, ivbits, typ) \
|
||||
IMPLEMENT_var_keylen_cipher_func(alg, UCALG, lcmode, UCMODE, flags, kbits, \
|
||||
blkbits, ivbits, typ)
|
||||
|
||||
PROV_CIPHER_HW_FN cipher_hw_generic_cbc;
|
||||
PROV_CIPHER_HW_FN cipher_hw_generic_ecb;
|
||||
PROV_CIPHER_HW_FN cipher_hw_generic_ofb128;
|
||||
PROV_CIPHER_HW_FN cipher_hw_generic_cfb128;
|
||||
PROV_CIPHER_HW_FN cipher_hw_generic_cfb8;
|
||||
PROV_CIPHER_HW_FN cipher_hw_generic_cfb1;
|
||||
PROV_CIPHER_HW_FN cipher_hw_generic_ctr;
|
||||
PROV_CIPHER_HW_FN cipher_hw_chunked_cbc;
|
||||
PROV_CIPHER_HW_FN cipher_hw_chunked_cfb8;
|
||||
PROV_CIPHER_HW_FN cipher_hw_chunked_cfb128;
|
||||
PROV_CIPHER_HW_FN cipher_hw_chunked_ofb128;
|
||||
#define cipher_hw_chunked_ecb cipher_hw_generic_ecb
|
||||
#define cipher_hw_chunked_ctr cipher_hw_generic_ctr
|
||||
#define cipher_hw_chunked_cfb1 cipher_hw_generic_cfb1
|
||||
|
||||
#define IMPLEMENT_CIPHER_HW_OFB(MODE, NAME, CTX_NAME, KEY_NAME, FUNC_PREFIX) \
|
||||
static int cipher_hw_##NAME##_##MODE##_cipher(PROV_CIPHER_CTX *ctx, \
|
||||
unsigned char *out, \
|
||||
const unsigned char *in, size_t len) \
|
||||
{ \
|
||||
int num = ctx->num; \
|
||||
KEY_NAME *key = &(((CTX_NAME *)ctx)->ks.ks); \
|
||||
\
|
||||
while (len >= MAXCHUNK) { \
|
||||
FUNC_PREFIX##_encrypt(in, out, MAXCHUNK, key, ctx->iv, &num); \
|
||||
len -= MAXCHUNK; \
|
||||
in += MAXCHUNK; \
|
||||
out += MAXCHUNK; \
|
||||
} \
|
||||
if (len > 0) { \
|
||||
FUNC_PREFIX##_encrypt(in, out, (long)len, key, ctx->iv, &num); \
|
||||
} \
|
||||
ctx->num = num; \
|
||||
return 1; \
|
||||
}
|
||||
|
||||
#define IMPLEMENT_CIPHER_HW_ECB(MODE, NAME, CTX_NAME, KEY_NAME, FUNC_PREFIX) \
|
||||
static int cipher_hw_##NAME##_##MODE##_cipher(PROV_CIPHER_CTX *ctx, \
|
||||
unsigned char *out, \
|
||||
const unsigned char *in, size_t len) \
|
||||
{ \
|
||||
size_t i, bl = ctx->blocksize; \
|
||||
KEY_NAME *key = &(((CTX_NAME *)ctx)->ks.ks); \
|
||||
\
|
||||
if (len < bl) \
|
||||
return 1; \
|
||||
for (i = 0, len -= bl; i <= len; i += bl) \
|
||||
FUNC_PREFIX##_encrypt(in + i, out + i, key, ctx->enc); \
|
||||
return 1; \
|
||||
}
|
||||
|
||||
#define IMPLEMENT_CIPHER_HW_CBC(MODE, NAME, CTX_NAME, KEY_NAME, FUNC_PREFIX) \
|
||||
static int cipher_hw_##NAME##_##MODE##_cipher(PROV_CIPHER_CTX *ctx, \
|
||||
unsigned char *out, \
|
||||
const unsigned char *in, size_t len) \
|
||||
{ \
|
||||
KEY_NAME *key = &(((CTX_NAME *)ctx)->ks.ks); \
|
||||
\
|
||||
while (len >= MAXCHUNK) { \
|
||||
FUNC_PREFIX##_encrypt(in, out, MAXCHUNK, key, ctx->iv, ctx->enc); \
|
||||
len -= MAXCHUNK; \
|
||||
in += MAXCHUNK; \
|
||||
out += MAXCHUNK; \
|
||||
} \
|
||||
if (len > 0) \
|
||||
FUNC_PREFIX##_encrypt(in, out, (long)len, key, ctx->iv, ctx->enc); \
|
||||
return 1; \
|
||||
}
|
||||
|
||||
#define IMPLEMENT_CIPHER_HW_CFB(MODE, NAME, CTX_NAME, KEY_NAME, FUNC_PREFIX) \
|
||||
static int cipher_hw_##NAME##_##MODE##_cipher(PROV_CIPHER_CTX *ctx, \
|
||||
unsigned char *out, \
|
||||
const unsigned char *in, size_t len) \
|
||||
{ \
|
||||
size_t chunk = MAXCHUNK; \
|
||||
KEY_NAME *key = &(((CTX_NAME *)ctx)->ks.ks); \
|
||||
int num = ctx->num; \
|
||||
\
|
||||
if (len < chunk) \
|
||||
chunk = len; \
|
||||
while (len > 0 && len >= chunk) { \
|
||||
FUNC_PREFIX##_encrypt(in, out, (long)chunk, key, ctx->iv, &num, \
|
||||
ctx->enc); \
|
||||
len -= chunk; \
|
||||
in += chunk; \
|
||||
out += chunk; \
|
||||
if (len < chunk) \
|
||||
chunk = len; \
|
||||
} \
|
||||
ctx->num = num; \
|
||||
return 1; \
|
||||
}
|
||||
|
||||
#define IMPLEMENT_CIPHER_HW_COPYCTX(name, CTX_TYPE) \
|
||||
static void name(PROV_CIPHER_CTX *dst, const PROV_CIPHER_CTX *src) \
|
||||
{ \
|
||||
CTX_TYPE *sctx = (CTX_TYPE *)src; \
|
||||
CTX_TYPE *dctx = (CTX_TYPE *)dst; \
|
||||
\
|
||||
*dctx = *sctx; \
|
||||
dst->ks = &dctx->ks.ks; \
|
||||
}
|
||||
|
||||
#define CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_START(name) \
|
||||
static const OSSL_PARAM name##_known_gettable_ctx_params[] = { \
|
||||
OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_KEYLEN, NULL), \
|
||||
OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_IVLEN, NULL), \
|
||||
OSSL_PARAM_uint(OSSL_CIPHER_PARAM_PADDING, NULL), \
|
||||
OSSL_PARAM_uint(OSSL_CIPHER_PARAM_NUM, NULL), \
|
||||
OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_IV, NULL, 0),
|
||||
|
||||
#define CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_END(name) \
|
||||
OSSL_PARAM_END \
|
||||
}; \
|
||||
const OSSL_PARAM * name##_gettable_ctx_params(void) \
|
||||
{ \
|
||||
return name##_known_gettable_ctx_params; \
|
||||
}
|
||||
|
||||
#define CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_START(name) \
|
||||
static const OSSL_PARAM name##_known_settable_ctx_params[] = { \
|
||||
OSSL_PARAM_uint(OSSL_CIPHER_PARAM_PADDING, NULL), \
|
||||
OSSL_PARAM_uint(OSSL_CIPHER_PARAM_NUM, NULL),
|
||||
#define CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_END(name) \
|
||||
OSSL_PARAM_END \
|
||||
}; \
|
||||
const OSSL_PARAM * name##_settable_ctx_params(void) \
|
||||
{ \
|
||||
return name##_known_settable_ctx_params; \
|
||||
}
|
||||
|
||||
int cipher_generic_initiv(PROV_CIPHER_CTX *ctx, const unsigned char *iv,
|
||||
size_t ivlen);
|
||||
|
||||
size_t fillblock(unsigned char *buf, size_t *buflen, size_t blocksize,
|
||||
const unsigned char **in, size_t *inlen);
|
||||
int trailingdata(unsigned char *buf, size_t *buflen, size_t blocksize,
|
||||
const unsigned char **in, size_t *inlen);
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#define UNINITIALISED_SIZET ((size_t)-1)
|
||||
|
||||
/* TODO(3.0) Figure out what flags are really needed */
|
||||
#define AEAD_FLAGS (EVP_CIPH_FLAG_AEAD_CIPHER \
|
||||
| EVP_CIPH_CUSTOM_IV \
|
||||
| EVP_CIPH_ALWAYS_CALL_INIT \
|
||||
| EVP_CIPH_CTRL_INIT \
|
||||
| EVP_CIPH_CUSTOM_COPY)
|
||||
|
||||
#define IMPLEMENT_aead_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \
|
||||
static OSSL_OP_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \
|
||||
static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \
|
||||
{ \
|
||||
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
|
||||
flags, kbits, blkbits, ivbits); \
|
||||
} \
|
||||
static OSSL_OP_cipher_newctx_fn alg##kbits##lc##_newctx; \
|
||||
static void * alg##kbits##lc##_newctx(void *provctx) \
|
||||
{ \
|
||||
return alg##_##lc##_newctx(provctx, kbits); \
|
||||
} \
|
||||
const OSSL_DISPATCH alg##kbits##lc##_functions[] = { \
|
||||
{ OSSL_FUNC_CIPHER_NEWCTX, (void (*)(void))alg##kbits##lc##_newctx }, \
|
||||
{ OSSL_FUNC_CIPHER_FREECTX, (void (*)(void))alg##_##lc##_freectx }, \
|
||||
{ OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void)) lc##_einit }, \
|
||||
{ OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void)) lc##_dinit }, \
|
||||
{ OSSL_FUNC_CIPHER_UPDATE, (void (*)(void)) lc##_stream_update }, \
|
||||
{ OSSL_FUNC_CIPHER_FINAL, (void (*)(void)) lc##_stream_final }, \
|
||||
{ OSSL_FUNC_CIPHER_CIPHER, (void (*)(void)) lc##_cipher }, \
|
||||
{ OSSL_FUNC_CIPHER_GET_PARAMS, \
|
||||
(void (*)(void)) alg##_##kbits##_##lc##_get_params }, \
|
||||
{ OSSL_FUNC_CIPHER_GET_CTX_PARAMS, \
|
||||
(void (*)(void)) lc##_get_ctx_params }, \
|
||||
{ OSSL_FUNC_CIPHER_SET_CTX_PARAMS, \
|
||||
(void (*)(void)) lc##_set_ctx_params }, \
|
||||
{ OSSL_FUNC_CIPHER_GETTABLE_PARAMS, \
|
||||
(void (*)(void))cipher_generic_gettable_params }, \
|
||||
{ OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS, \
|
||||
(void (*)(void))cipher_aead_gettable_ctx_params }, \
|
||||
{ OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS, \
|
||||
(void (*)(void))cipher_aead_settable_ctx_params }, \
|
||||
{ 0, NULL } \
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "ciphercommon_aead.h"
|
||||
|
||||
typedef struct prov_ccm_hw_st PROV_CCM_HW;
|
||||
|
||||
#if defined(OPENSSL_CPUID_OBJ) && defined(__s390__)
|
||||
/*-
|
||||
* KMAC-AES parameter block - begin
|
||||
* (see z/Architecture Principles of Operation >= SA22-7832-08)
|
||||
*/
|
||||
typedef struct S390X_kmac_params_st {
|
||||
union {
|
||||
unsigned long long g[2];
|
||||
unsigned char b[16];
|
||||
} icv;
|
||||
unsigned char k[32];
|
||||
} S390X_KMAC_PARAMS;
|
||||
/* KMAC-AES parameter block - end */
|
||||
#endif
|
||||
|
||||
/* Base structure that is shared by AES & ARIA for CCM MODE */
|
||||
typedef struct prov_ccm_st {
|
||||
unsigned int enc : 1;
|
||||
unsigned int key_set : 1; /* Set if key initialised */
|
||||
unsigned int iv_set : 1; /* Set if an iv is set */
|
||||
unsigned int tag_set : 1; /* Set if tag is valid */
|
||||
unsigned int len_set : 1; /* Set if message length set */
|
||||
size_t l, m; /* L and M parameters from RFC3610 */
|
||||
size_t keylen;
|
||||
size_t tls_aad_len; /* TLS AAD length */
|
||||
size_t tls_aad_pad_sz;
|
||||
unsigned char iv[GENERIC_BLOCK_SIZE];
|
||||
unsigned char buf[GENERIC_BLOCK_SIZE];
|
||||
CCM128_CONTEXT ccm_ctx;
|
||||
ccm128_f str;
|
||||
const PROV_CCM_HW *hw; /* hardware specific methods */
|
||||
} PROV_CCM_CTX;
|
||||
|
||||
PROV_CIPHER_FUNC(int, CCM_cipher, (PROV_CCM_CTX *ctx, unsigned char *out, \
|
||||
size_t *padlen, const unsigned char *in, \
|
||||
size_t len));
|
||||
PROV_CIPHER_FUNC(int, CCM_setkey, (PROV_CCM_CTX *ctx, \
|
||||
const unsigned char *key, size_t keylen));
|
||||
PROV_CIPHER_FUNC(int, CCM_setiv, (PROV_CCM_CTX *dat, \
|
||||
const unsigned char *iv, size_t ivlen, \
|
||||
size_t mlen));
|
||||
PROV_CIPHER_FUNC(int, CCM_setaad, (PROV_CCM_CTX *ctx, \
|
||||
const unsigned char *aad, size_t aadlen));
|
||||
PROV_CIPHER_FUNC(int, CCM_auth_encrypt, (PROV_CCM_CTX *ctx, \
|
||||
const unsigned char *in, \
|
||||
unsigned char *out, size_t len, \
|
||||
unsigned char *tag, size_t taglen));
|
||||
PROV_CIPHER_FUNC(int, CCM_auth_decrypt, (PROV_CCM_CTX *ctx, \
|
||||
const unsigned char *in, \
|
||||
unsigned char *out, size_t len, \
|
||||
unsigned char *tag, size_t taglen));
|
||||
PROV_CIPHER_FUNC(int, CCM_gettag, (PROV_CCM_CTX *ctx, \
|
||||
unsigned char *tag, size_t taglen));
|
||||
|
||||
/*
|
||||
* CCM Mode internal method table used to handle hardware specific differences,
|
||||
* (and different algorithms).
|
||||
*/
|
||||
struct prov_ccm_hw_st {
|
||||
OSSL_CCM_setkey_fn setkey;
|
||||
OSSL_CCM_setiv_fn setiv;
|
||||
OSSL_CCM_setaad_fn setaad;
|
||||
OSSL_CCM_auth_encrypt_fn auth_encrypt;
|
||||
OSSL_CCM_auth_decrypt_fn auth_decrypt;
|
||||
OSSL_CCM_gettag_fn gettag;
|
||||
};
|
||||
|
||||
OSSL_OP_cipher_encrypt_init_fn ccm_einit;
|
||||
OSSL_OP_cipher_decrypt_init_fn ccm_dinit;
|
||||
OSSL_OP_cipher_get_ctx_params_fn ccm_get_ctx_params;
|
||||
OSSL_OP_cipher_set_ctx_params_fn ccm_set_ctx_params;
|
||||
OSSL_OP_cipher_update_fn ccm_stream_update;
|
||||
OSSL_OP_cipher_final_fn ccm_stream_final;
|
||||
OSSL_OP_cipher_cipher_fn ccm_cipher;
|
||||
void ccm_initctx(PROV_CCM_CTX *ctx, size_t keybits, const PROV_CCM_HW *hw);
|
||||
|
||||
int ccm_generic_setiv(PROV_CCM_CTX *ctx, const unsigned char *nonce,
|
||||
size_t nlen, size_t mlen);
|
||||
int ccm_generic_setaad(PROV_CCM_CTX *ctx, const unsigned char *aad, size_t alen);
|
||||
int ccm_generic_gettag(PROV_CCM_CTX *ctx, unsigned char *tag, size_t tlen);
|
||||
int ccm_generic_auth_encrypt(PROV_CCM_CTX *ctx, const unsigned char *in,
|
||||
unsigned char *out, size_t len,
|
||||
unsigned char *tag, size_t taglen);
|
||||
int ccm_generic_auth_decrypt(PROV_CCM_CTX *ctx, const unsigned char *in,
|
||||
unsigned char *out, size_t len,
|
||||
unsigned char *expected_tag, size_t taglen);
|
||||
@@ -0,0 +1,130 @@
|
||||
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <openssl/aes.h>
|
||||
#include "ciphercommon_aead.h"
|
||||
|
||||
typedef struct prov_gcm_hw_st PROV_GCM_HW;
|
||||
|
||||
#define GCM_IV_DEFAULT_SIZE 12 /* IV's for AES_GCM should normally be 12 bytes */
|
||||
#define GCM_IV_MAX_SIZE 64
|
||||
#define GCM_TAG_MAX_SIZE 16
|
||||
|
||||
#if defined(OPENSSL_CPUID_OBJ) && defined(__s390__)
|
||||
/*-
|
||||
* KMA-GCM-AES parameter block - begin
|
||||
* (see z/Architecture Principles of Operation >= SA22-7832-11)
|
||||
*/
|
||||
typedef struct S390X_kma_params_st {
|
||||
unsigned char reserved[12];
|
||||
union {
|
||||
unsigned int w;
|
||||
unsigned char b[4];
|
||||
} cv; /* 32 bit counter value */
|
||||
union {
|
||||
unsigned long long g[2];
|
||||
unsigned char b[16];
|
||||
} t; /* tag */
|
||||
unsigned char h[16]; /* hash subkey */
|
||||
unsigned long long taadl; /* total AAD length */
|
||||
unsigned long long tpcl; /* total plaintxt/ciphertxt len */
|
||||
union {
|
||||
unsigned long long g[2];
|
||||
unsigned int w[4];
|
||||
} j0; /* initial counter value */
|
||||
unsigned char k[32]; /* key */
|
||||
} S390X_KMA_PARAMS;
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct prov_gcm_ctx_st {
|
||||
unsigned int mode; /* The mode that we are using */
|
||||
size_t keylen;
|
||||
size_t ivlen;
|
||||
size_t ivlen_min;
|
||||
size_t taglen;
|
||||
size_t tls_aad_pad_sz;
|
||||
size_t tls_aad_len; /* TLS AAD length */
|
||||
uint64_t tls_enc_records; /* Number of TLS records encrypted */
|
||||
|
||||
/*
|
||||
* num contains the number of bytes of |iv| which are valid for modes that
|
||||
* manage partial blocks themselves.
|
||||
*/
|
||||
size_t num;
|
||||
size_t bufsz; /* Number of bytes in buf */
|
||||
uint64_t flags;
|
||||
|
||||
unsigned int iv_state; /* set to one of IV_STATE_XXX */
|
||||
unsigned int enc:1; /* Set to 1 if we are encrypting or 0 otherwise */
|
||||
unsigned int pad:1; /* Whether padding should be used or not */
|
||||
unsigned int key_set:1; /* Set if key initialised */
|
||||
unsigned int iv_gen_rand:1; /* No IV was specified, so generate a rand IV */
|
||||
unsigned int iv_gen:1; /* It is OK to generate IVs */
|
||||
|
||||
unsigned char iv[GCM_IV_MAX_SIZE]; /* Buffer to use for IV's */
|
||||
unsigned char buf[AES_BLOCK_SIZE]; /* Buffer of partial blocks processed via update calls */
|
||||
|
||||
OPENSSL_CTX *libctx; /* needed for rand calls */
|
||||
const PROV_GCM_HW *hw; /* hardware specific methods */
|
||||
GCM128_CONTEXT gcm;
|
||||
ctr128_f ctr;
|
||||
const void *ks;
|
||||
} PROV_GCM_CTX;
|
||||
|
||||
PROV_CIPHER_FUNC(int, GCM_setkey, (PROV_GCM_CTX *ctx, const unsigned char *key,
|
||||
size_t keylen));
|
||||
PROV_CIPHER_FUNC(int, GCM_setiv, (PROV_GCM_CTX *dat, const unsigned char *iv,
|
||||
size_t ivlen));
|
||||
PROV_CIPHER_FUNC(int, GCM_aadupdate, (PROV_GCM_CTX *ctx,
|
||||
const unsigned char *aad, size_t aadlen));
|
||||
PROV_CIPHER_FUNC(int, GCM_cipherupdate, (PROV_GCM_CTX *ctx,
|
||||
const unsigned char *in, size_t len,
|
||||
unsigned char *out));
|
||||
PROV_CIPHER_FUNC(int, GCM_cipherfinal, (PROV_GCM_CTX *ctx, unsigned char *tag));
|
||||
PROV_CIPHER_FUNC(int, GCM_oneshot, (PROV_GCM_CTX *ctx, unsigned char *aad,
|
||||
size_t aad_len, const unsigned char *in,
|
||||
size_t in_len, unsigned char *out,
|
||||
unsigned char *tag, size_t taglen));
|
||||
struct prov_gcm_hw_st {
|
||||
OSSL_GCM_setkey_fn setkey;
|
||||
OSSL_GCM_setiv_fn setiv;
|
||||
OSSL_GCM_aadupdate_fn aadupdate;
|
||||
OSSL_GCM_cipherupdate_fn cipherupdate;
|
||||
OSSL_GCM_cipherfinal_fn cipherfinal;
|
||||
OSSL_GCM_oneshot_fn oneshot;
|
||||
};
|
||||
|
||||
OSSL_OP_cipher_encrypt_init_fn gcm_einit;
|
||||
OSSL_OP_cipher_decrypt_init_fn gcm_dinit;
|
||||
OSSL_OP_cipher_get_ctx_params_fn gcm_get_ctx_params;
|
||||
OSSL_OP_cipher_set_ctx_params_fn gcm_set_ctx_params;
|
||||
OSSL_OP_cipher_cipher_fn gcm_cipher;
|
||||
OSSL_OP_cipher_update_fn gcm_stream_update;
|
||||
OSSL_OP_cipher_final_fn gcm_stream_final;
|
||||
void gcm_initctx(void *provctx, PROV_GCM_CTX *ctx, size_t keybits,
|
||||
const PROV_GCM_HW *hw, size_t ivlen_min);
|
||||
|
||||
int gcm_setiv(PROV_GCM_CTX *ctx, const unsigned char *iv, size_t ivlen);
|
||||
int gcm_aad_update(PROV_GCM_CTX *ctx, const unsigned char *aad,
|
||||
size_t aad_len);
|
||||
int gcm_cipher_final(PROV_GCM_CTX *ctx, unsigned char *tag);
|
||||
int gcm_one_shot(PROV_GCM_CTX *ctx, unsigned char *aad, size_t aad_len,
|
||||
const unsigned char *in, size_t in_len,
|
||||
unsigned char *out, unsigned char *tag, size_t tag_len);
|
||||
int gcm_cipher_update(PROV_GCM_CTX *ctx, const unsigned char *in,
|
||||
size_t len, unsigned char *out);
|
||||
|
||||
#define GCM_HW_SET_KEY_CTR_FN(ks, fn_set_enc_key, fn_block, fn_ctr) \
|
||||
ctx->ks = ks; \
|
||||
fn_set_enc_key(key, keylen * 8, ks); \
|
||||
CRYPTO_gcm128_init(&ctx->gcm, ks, (block128_f)fn_block); \
|
||||
ctx->ctr = (ctr128_f)fn_ctr; \
|
||||
ctx->key_set = 1;
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef OSSL_PROVIDERS_DIGESTCOMMON_H
|
||||
# define OSSL_PROVIDERS_DIGESTCOMMON_H
|
||||
|
||||
# include <openssl/core_numbers.h>
|
||||
# include <openssl/core_names.h>
|
||||
# include <openssl/params.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
#define PROV_FUNC_DIGEST_GET_PARAM(name, blksize, dgstsize, flags) \
|
||||
static OSSL_OP_digest_get_params_fn name##_get_params; \
|
||||
static int name##_get_params(OSSL_PARAM params[]) \
|
||||
{ \
|
||||
return digest_default_get_params(params, blksize, dgstsize, flags); \
|
||||
}
|
||||
|
||||
#define PROV_DISPATCH_FUNC_DIGEST_GET_PARAMS(name) \
|
||||
{ OSSL_FUNC_DIGEST_GET_PARAMS, (void (*)(void))name##_get_params }, \
|
||||
{ OSSL_FUNC_DIGEST_GETTABLE_PARAMS, \
|
||||
(void (*)(void))digest_default_gettable_params }
|
||||
|
||||
# define PROV_DISPATCH_FUNC_DIGEST_CONSTRUCT_START( \
|
||||
name, CTX, blksize, dgstsize, flags, init, upd, fin) \
|
||||
static OSSL_OP_digest_newctx_fn name##_newctx; \
|
||||
static OSSL_OP_digest_freectx_fn name##_freectx; \
|
||||
static OSSL_OP_digest_dupctx_fn name##_dupctx; \
|
||||
static void *name##_newctx(void *prov_ctx) \
|
||||
{ \
|
||||
CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \
|
||||
return ctx; \
|
||||
} \
|
||||
static void name##_freectx(void *vctx) \
|
||||
{ \
|
||||
CTX *ctx = (CTX *)vctx; \
|
||||
OPENSSL_clear_free(ctx, sizeof(*ctx)); \
|
||||
} \
|
||||
static void *name##_dupctx(void *ctx) \
|
||||
{ \
|
||||
CTX *in = (CTX *)ctx; \
|
||||
CTX *ret = OPENSSL_malloc(sizeof(*ret)); \
|
||||
if (ret != NULL) \
|
||||
*ret = *in; \
|
||||
return ret; \
|
||||
} \
|
||||
static OSSL_OP_digest_final_fn name##_internal_final; \
|
||||
static int name##_internal_final(void *ctx, unsigned char *out, size_t *outl, \
|
||||
size_t outsz) \
|
||||
{ \
|
||||
if (outsz >= dgstsize && fin(out, ctx)) { \
|
||||
*outl = dgstsize; \
|
||||
return 1; \
|
||||
} \
|
||||
return 0; \
|
||||
} \
|
||||
PROV_FUNC_DIGEST_GET_PARAM(name, blksize, dgstsize, flags) \
|
||||
const OSSL_DISPATCH name##_functions[] = { \
|
||||
{ OSSL_FUNC_DIGEST_NEWCTX, (void (*)(void))name##_newctx }, \
|
||||
{ OSSL_FUNC_DIGEST_INIT, (void (*)(void))init }, \
|
||||
{ OSSL_FUNC_DIGEST_UPDATE, (void (*)(void))upd }, \
|
||||
{ OSSL_FUNC_DIGEST_FINAL, (void (*)(void))name##_internal_final }, \
|
||||
{ OSSL_FUNC_DIGEST_FREECTX, (void (*)(void))name##_freectx }, \
|
||||
{ OSSL_FUNC_DIGEST_DUPCTX, (void (*)(void))name##_dupctx }, \
|
||||
PROV_DISPATCH_FUNC_DIGEST_GET_PARAMS(name)
|
||||
|
||||
# define PROV_DISPATCH_FUNC_DIGEST_CONSTRUCT_END \
|
||||
{ 0, NULL } \
|
||||
};
|
||||
|
||||
# define IMPLEMENT_digest_functions( \
|
||||
name, CTX, blksize, dgstsize, flags, init, upd, fin) \
|
||||
PROV_DISPATCH_FUNC_DIGEST_CONSTRUCT_START(name, CTX, blksize, dgstsize, flags, \
|
||||
init, upd, fin), \
|
||||
PROV_DISPATCH_FUNC_DIGEST_CONSTRUCT_END
|
||||
|
||||
# define IMPLEMENT_digest_functions_with_settable_ctx( \
|
||||
name, CTX, blksize, dgstsize, flags, init, upd, fin, \
|
||||
settable_ctx_params, set_ctx_params) \
|
||||
PROV_DISPATCH_FUNC_DIGEST_CONSTRUCT_START(name, CTX, blksize, dgstsize, flags, \
|
||||
init, upd, fin), \
|
||||
{ OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS, (void (*)(void))settable_ctx_params }, \
|
||||
{ OSSL_FUNC_DIGEST_SET_CTX_PARAMS, (void (*)(void))set_ctx_params }, \
|
||||
PROV_DISPATCH_FUNC_DIGEST_CONSTRUCT_END
|
||||
|
||||
|
||||
const OSSL_PARAM *digest_default_gettable_params(void);
|
||||
int digest_default_get_params(OSSL_PARAM params[], size_t blksz, size_t paramsz,
|
||||
unsigned long flags);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* OSSL_PROVIDERS_DIGESTCOMMON_H */
|
||||
@@ -75,6 +75,10 @@ extern const OSSL_DISPATCH aes128wrap_functions[];
|
||||
extern const OSSL_DISPATCH aes256wrappad_functions[];
|
||||
extern const OSSL_DISPATCH aes192wrappad_functions[];
|
||||
extern const OSSL_DISPATCH aes128wrappad_functions[];
|
||||
extern const OSSL_DISPATCH aes256cbc_hmac_sha1_functions[];
|
||||
extern const OSSL_DISPATCH aes128cbc_hmac_sha1_functions[];
|
||||
extern const OSSL_DISPATCH aes256cbc_hmac_sha256_functions[];
|
||||
extern const OSSL_DISPATCH aes128cbc_hmac_sha256_functions[];
|
||||
|
||||
#ifndef OPENSSL_NO_ARIA
|
||||
extern const OSSL_DISPATCH aria256gcm_functions[];
|
||||
@@ -202,6 +206,9 @@ extern const OSSL_DISPATCH des_cfb8_functions[];
|
||||
#ifndef OPENSSL_NO_RC4
|
||||
extern const OSSL_DISPATCH rc440_functions[];
|
||||
extern const OSSL_DISPATCH rc4128_functions[];
|
||||
# ifndef OPENSSL_NO_MD5
|
||||
extern const OSSL_DISPATCH rc4_hmac_md5_functions[];
|
||||
# endif /* OPENSSL_NO_MD5 */
|
||||
#endif /* OPENSSL_NO_RC4 */
|
||||
#ifndef OPENSSL_NO_CHACHA
|
||||
extern const OSSL_DISPATCH chacha20_functions[];
|
||||
@@ -211,6 +218,12 @@ extern const OSSL_DISPATCH chacha20_poly1305_functions[];
|
||||
#endif /* OPENSSL_NO_CHACHA */
|
||||
|
||||
|
||||
#ifndef OPENSSL_NO_SIV
|
||||
extern const OSSL_DISPATCH aes128siv_functions[];
|
||||
extern const OSSL_DISPATCH aes192siv_functions[];
|
||||
extern const OSSL_DISPATCH aes256siv_functions[];
|
||||
#endif /* OPENSSL_NO_SIV */
|
||||
|
||||
/* MACs */
|
||||
extern const OSSL_DISPATCH blake2bmac_functions[];
|
||||
extern const OSSL_DISPATCH blake2smac_functions[];
|
||||
@@ -236,14 +249,45 @@ extern const OSSL_DISPATCH kdf_kbkdf_functions[];
|
||||
#ifndef OPENSSL_NO_CMS
|
||||
extern const OSSL_DISPATCH kdf_x942_kdf_functions[];
|
||||
#endif
|
||||
extern const OSSL_DISPATCH kdf_krb5kdf_functions[];
|
||||
|
||||
|
||||
/* Key management */
|
||||
extern const OSSL_DISPATCH dh_keymgmt_functions[];
|
||||
extern const OSSL_DISPATCH dsa_keymgmt_functions[];
|
||||
extern const OSSL_DISPATCH rsa_keymgmt_functions[];
|
||||
|
||||
/* Key Exchange */
|
||||
extern const OSSL_DISPATCH dh_keyexch_functions[];
|
||||
|
||||
/* Signature */
|
||||
extern const OSSL_DISPATCH dsa_signature_functions[];
|
||||
|
||||
/* Asym Cipher */
|
||||
extern const OSSL_DISPATCH rsa_asym_cipher_functions[];
|
||||
|
||||
/* Serializers */
|
||||
extern const OSSL_DISPATCH rsa_priv_text_serializer_functions[];
|
||||
extern const OSSL_DISPATCH rsa_pub_text_serializer_functions[];
|
||||
extern const OSSL_DISPATCH rsa_priv_der_serializer_functions[];
|
||||
extern const OSSL_DISPATCH rsa_pub_der_serializer_functions[];
|
||||
extern const OSSL_DISPATCH rsa_priv_pem_serializer_functions[];
|
||||
extern const OSSL_DISPATCH rsa_pub_pem_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dh_priv_text_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dh_pub_text_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dh_param_text_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dh_priv_der_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dh_pub_der_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dh_param_der_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dh_priv_pem_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dh_pub_pem_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dh_param_pem_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dsa_priv_text_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dsa_pub_text_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dsa_param_text_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dsa_priv_der_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dsa_pub_der_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dsa_param_der_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dsa_priv_pem_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dsa_pub_pem_serializer_functions[];
|
||||
extern const OSSL_DISPATCH dsa_param_pem_serializer_functions[];
|
||||
Reference in New Issue
Block a user