Browse Source

prov: prefix all OSSL_DISPATCH tables names with ossl_

This stops them leaking into other namespaces in a static build.
They remain internal.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13013)
master
Pauli 2 years ago
parent
commit
1be63951f8
95 changed files with 918 additions and 896 deletions
  1. +15
    -15
      providers/decoders.inc
  2. +200
    -194
      providers/defltprov.c
  3. +30
    -30
      providers/encoders.inc
  4. +117
    -104
      providers/fips/fipsprov.c
  5. +1
    -1
      providers/implementations/asymciphers/rsa_enc.c
  6. +21
    -21
      providers/implementations/ciphers/cipher_aes.c
  7. +6
    -6
      providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c
  8. +3
    -3
      providers/implementations/ciphers/cipher_aes_ccm.c
  9. +4
    -4
      providers/implementations/ciphers/cipher_aes_cts.inc
  10. +3
    -3
      providers/implementations/ciphers/cipher_aes_gcm.c
  11. +1
    -1
      providers/implementations/ciphers/cipher_aes_ocb.c
  12. +1
    -1
      providers/implementations/ciphers/cipher_aes_siv.c
  13. +1
    -1
      providers/implementations/ciphers/cipher_aes_wrp.c
  14. +2
    -1
      providers/implementations/ciphers/cipher_aes_xts.c
  15. +21
    -21
      providers/implementations/ciphers/cipher_aria.c
  16. +3
    -3
      providers/implementations/ciphers/cipher_aria_gcm.c
  17. +21
    -21
      providers/implementations/ciphers/cipher_camellia.c
  18. +4
    -4
      providers/implementations/ciphers/cipher_cast5.c
  19. +2
    -2
      providers/implementations/ciphers/cipher_chacha20.c
  20. +2
    -2
      providers/implementations/ciphers/cipher_chacha20_poly1305.c
  21. +7
    -7
      providers/implementations/ciphers/cipher_des.c
  22. +4
    -4
      providers/implementations/ciphers/cipher_idea.c
  23. +1
    -1
      providers/implementations/ciphers/cipher_null.c
  24. +7
    -7
      providers/implementations/ciphers/cipher_rc2.c
  25. +3
    -3
      providers/implementations/ciphers/cipher_rc4.c
  26. +1
    -1
      providers/implementations/ciphers/cipher_rc4_hmac_md5.c
  27. +5
    -5
      providers/implementations/ciphers/cipher_rc5.c
  28. +4
    -4
      providers/implementations/ciphers/cipher_seed.c
  29. +5
    -5
      providers/implementations/ciphers/cipher_sm4.c
  30. +2
    -2
      providers/implementations/ciphers/cipher_tdes.c
  31. +1
    -1
      providers/implementations/ciphers/cipher_tdes.h
  32. +8
    -8
      providers/implementations/ciphers/cipher_tdes_default.c
  33. +2
    -2
      providers/implementations/ciphers/cipher_tdes_wrap.c
  34. +2
    -2
      providers/implementations/digests/blake2_prov.c
  35. +1
    -1
      providers/implementations/digests/md2_prov.c
  36. +1
    -1
      providers/implementations/digests/md4_prov.c
  37. +1
    -1
      providers/implementations/digests/md5_prov.c
  38. +1
    -1
      providers/implementations/digests/md5_sha1_prov.c
  39. +1
    -1
      providers/implementations/digests/mdc2_prov.c
  40. +1
    -1
      providers/implementations/digests/ripemd_prov.c
  41. +7
    -7
      providers/implementations/digests/sha2_prov.c
  42. +9
    -9
      providers/implementations/digests/sha3_prov.c
  43. +1
    -1
      providers/implementations/digests/sm3_prov.c
  44. +1
    -1
      providers/implementations/digests/wp_prov.c
  45. +3
    -2
      providers/implementations/encode_decode/decode_der2key.c
  46. +3
    -2
      providers/implementations/encode_decode/decode_ms2key.c
  47. +1
    -1
      providers/implementations/encode_decode/decode_pem2der.c
  48. +3
    -3
      providers/implementations/encode_decode/encode_key2any.c
  49. +4
    -4
      providers/implementations/encode_decode/encode_key2text.c
  50. +1
    -1
      providers/implementations/exchange/dh_exch.c
  51. +1
    -1
      providers/implementations/exchange/ecdh_exch.c
  52. +2
    -2
      providers/implementations/exchange/ecx_exch.c
  53. +1
    -1
      providers/implementations/exchange/kdf_exch.c
  54. +2
    -2
      providers/implementations/include/prov/ciphercommon.h
  55. +1
    -1
      providers/implementations/include/prov/ciphercommon_aead.h
  56. +1
    -1
      providers/implementations/include/prov/digestcommon.h
  57. +277
    -277
      providers/implementations/include/prov/implementations.h
  58. +1
    -1
      providers/implementations/kdfs/hkdf.c
  59. +1
    -1
      providers/implementations/kdfs/kbkdf.c
  60. +1
    -1
      providers/implementations/kdfs/krb5kdf.c
  61. +1
    -1
      providers/implementations/kdfs/pbkdf2.c
  62. +1
    -1
      providers/implementations/kdfs/pkcs12kdf.c
  63. +1
    -1
      providers/implementations/kdfs/scrypt.c
  64. +1
    -1
      providers/implementations/kdfs/sshkdf.c
  65. +2
    -2
      providers/implementations/kdfs/sskdf.c
  66. +1
    -1
      providers/implementations/kdfs/tls1_prf.c
  67. +1
    -1
      providers/implementations/kdfs/x942kdf.c
  68. +1
    -1
      providers/implementations/kem/rsa_kem.c
  69. +2
    -2
      providers/implementations/keymgmt/dh_kmgmt.c
  70. +1
    -1
      providers/implementations/keymgmt/dsa_kmgmt.c
  71. +1
    -1
      providers/implementations/keymgmt/ec_kmgmt.c
  72. +1
    -1
      providers/implementations/keymgmt/ecx_kmgmt.c
  73. +1
    -1
      providers/implementations/keymgmt/kdf_legacy_kmgmt.c
  74. +2
    -2
      providers/implementations/keymgmt/mac_legacy_kmgmt.c
  75. +2
    -2
      providers/implementations/keymgmt/rsa_kmgmt.c
  76. +1
    -1
      providers/implementations/macs/blake2b_mac.c
  77. +1
    -1
      providers/implementations/macs/blake2s_mac.c
  78. +1
    -1
      providers/implementations/macs/cmac_prov.c
  79. +1
    -1
      providers/implementations/macs/gmac_prov.c
  80. +1
    -1
      providers/implementations/macs/hmac_prov.c
  81. +2
    -2
      providers/implementations/macs/kmac_prov.c
  82. +1
    -1
      providers/implementations/macs/poly1305_prov.c
  83. +1
    -1
      providers/implementations/macs/siphash_prov.c
  84. +1
    -1
      providers/implementations/rands/drbg_ctr.c
  85. +1
    -1
      providers/implementations/rands/drbg_hash.c
  86. +1
    -1
      providers/implementations/rands/drbg_hmac.c
  87. +1
    -1
      providers/implementations/rands/test_rng.c
  88. +1
    -1
      providers/implementations/signature/dsa.c
  89. +1
    -1
      providers/implementations/signature/ecdsa.c
  90. +2
    -2
      providers/implementations/signature/eddsa.c
  91. +1
    -1
      providers/implementations/signature/mac_legacy.c
  92. +1
    -1
      providers/implementations/signature/rsa.c
  93. +1
    -1
      providers/implementations/storemgmt/file_store.c
  94. +41
    -41
      providers/legacyprov.c
  95. +1
    -1
      providers/stores.inc

+ 15
- 15
providers/decoders.inc View File

@ -12,31 +12,31 @@
#endif
#ifndef OPENSSL_NO_DH
DECODER("DH", "yes", "der", der_to_dh_decoder_functions),
DECODER("DHX", "yes", "der", der_to_dhx_decoder_functions),
DECODER("DH", "yes", "der", ossl_der_to_dh_decoder_functions),
DECODER("DHX", "yes", "der", ossl_der_to_dhx_decoder_functions),
#endif
#ifndef OPENSSL_NO_DSA
DECODER("DSA", "yes", "der", der_to_dsa_decoder_functions),
DECODER("DSA", "yes", "mblob", msblob_to_dsa_decoder_functions),
DECODER("DSA", "yes", "der", ossl_der_to_dsa_decoder_functions),
DECODER("DSA", "yes", "mblob", ossl_msblob_to_dsa_decoder_functions),
# ifndef OPENSSL_NO_RC4
DECODER("DSA", "yes", "pvk", pvk_to_dsa_decoder_functions),
DECODER("DSA", "yes", "pvk", ossl_pvk_to_dsa_decoder_functions),
# endif
#endif
#ifndef OPENSSL_NO_EC
DECODER("EC", "yes", "der", der_to_ec_decoder_functions),
DECODER("ED25519", "yes", "der", der_to_ed25519_decoder_functions),
DECODER("ED448", "yes", "der", der_to_ed448_decoder_functions),
DECODER("X25519", "yes", "der", der_to_x25519_decoder_functions),
DECODER("X448", "yes", "der", der_to_x448_decoder_functions),
DECODER("EC", "yes", "der", ossl_der_to_ec_decoder_functions),
DECODER("ED25519", "yes", "der", ossl_der_to_ed25519_decoder_functions),
DECODER("ED448", "yes", "der", ossl_der_to_ed448_decoder_functions),
DECODER("X25519", "yes", "der", ossl_der_to_x25519_decoder_functions),
DECODER("X448", "yes", "der", ossl_der_to_x448_decoder_functions),
#endif
DECODER("RSA", "yes", "der", der_to_rsa_decoder_functions),
DECODER("RSA-PSS", "yes", "der", der_to_rsapss_decoder_functions),
DECODER("RSA", "yes", "der", ossl_der_to_rsa_decoder_functions),
DECODER("RSA-PSS", "yes", "der", ossl_der_to_rsapss_decoder_functions),
#ifndef OPENSSL_NO_DSA
DECODER("RSA", "yes", "mblob", msblob_to_rsa_decoder_functions),
DECODER("RSA", "yes", "mblob", ossl_msblob_to_rsa_decoder_functions),
# ifndef OPENSSL_NO_RC4
DECODER("RSA", "yes", "pvk", pvk_to_rsa_decoder_functions),
DECODER("RSA", "yes", "pvk", ossl_pvk_to_rsa_decoder_functions),
# endif
#endif
DECODER("DER", "yes", "pem", pem_to_der_decoder_functions),
DECODER("DER", "yes", "pem", ossl_pem_to_der_decoder_functions),

+ 200
- 194
providers/defltprov.c View File

@ -98,32 +98,34 @@ static int deflt_get_params(void *provctx, OSSL_PARAM params[])
*/
static const OSSL_ALGORITHM deflt_digests[] = {
/* Our primary name:NIST name[:our older names] */
{ "SHA1:SHA-1:SSL3-SHA1", "provider=default", sha1_functions },
{ "SHA2-224:SHA-224:SHA224", "provider=default", sha224_functions },
{ "SHA2-256:SHA-256:SHA256", "provider=default", sha256_functions },
{ "SHA2-384:SHA-384:SHA384", "provider=default", sha384_functions },
{ "SHA2-512:SHA-512:SHA512", "provider=default", sha512_functions },
{ "SHA1:SHA-1:SSL3-SHA1", "provider=default", ossl_sha1_functions },
{ "SHA2-224:SHA-224:SHA224", "provider=default", ossl_sha224_functions },
{ "SHA2-256:SHA-256:SHA256", "provider=default", ossl_sha256_functions },
{ "SHA2-384:SHA-384:SHA384", "provider=default", ossl_sha384_functions },
{ "SHA2-512:SHA-512:SHA512", "provider=default", ossl_sha512_functions },
{ "SHA2-512/224:SHA-512/224:SHA512-224", "provider=default",
sha512_224_functions },
ossl_sha512_224_functions },
{ "SHA2-512/256:SHA-512/256:SHA512-256", "provider=default",
sha512_256_functions },
ossl_sha512_256_functions },
/* We agree with NIST here, so one name only */
{ "SHA3-224", "provider=default", sha3_224_functions },
{ "SHA3-256", "provider=default", sha3_256_functions },
{ "SHA3-384", "provider=default", sha3_384_functions },
{ "SHA3-512", "provider=default", sha3_512_functions },
{ "SHA3-224", "provider=default", ossl_sha3_224_functions },
{ "SHA3-256", "provider=default", ossl_sha3_256_functions },
{ "SHA3-384", "provider=default", ossl_sha3_384_functions },
{ "SHA3-512", "provider=default", ossl_sha3_512_functions },
/*
* KECCAK-KMAC-128 and KECCAK-KMAC-256 as hashes are mostly useful for
* the KMAC-128 and KMAC-256.
*/
{ "KECCAK-KMAC-128:KECCAK-KMAC128", "provider=default", keccak_kmac_128_functions },
{ "KECCAK-KMAC-256:KECCAK-KMAC256", "provider=default", keccak_kmac_256_functions },
{ "KECCAK-KMAC-128:KECCAK-KMAC128", "provider=default",
ossl_keccak_kmac_128_functions },
{ "KECCAK-KMAC-256:KECCAK-KMAC256", "provider=default",
ossl_keccak_kmac_256_functions },
/* Our primary name:NIST name */
{ "SHAKE-128:SHAKE128", "provider=default", shake_128_functions },
{ "SHAKE-256:SHAKE256", "provider=default", shake_256_functions },
{ "SHAKE-128:SHAKE128", "provider=default", ossl_shake_128_functions },
{ "SHAKE-256:SHAKE256", "provider=default", ossl_shake_256_functions },
#ifndef OPENSSL_NO_BLAKE2
/*
@ -133,159 +135,159 @@ static const OSSL_ALGORITHM deflt_digests[] = {
* If we assume that "2b" and "2s" are versions, that pattern
* fits with ours. We also add our historical names.
*/
{ "BLAKE2S-256:BLAKE2s256", "provider=default", blake2s256_functions },
{ "BLAKE2B-512:BLAKE2b512", "provider=default", blake2b512_functions },
{ "BLAKE2S-256:BLAKE2s256", "provider=default", ossl_blake2s256_functions },
{ "BLAKE2B-512:BLAKE2b512", "provider=default", ossl_blake2b512_functions },
#endif /* OPENSSL_NO_BLAKE2 */
#ifndef OPENSSL_NO_SM3
{ "SM3", "provider=default", sm3_functions },
{ "SM3", "provider=default", ossl_sm3_functions },
#endif /* OPENSSL_NO_SM3 */
#ifndef OPENSSL_NO_MD5
{ "MD5:SSL3-MD5", "provider=default", md5_functions },
{ "MD5-SHA1", "provider=default", md5_sha1_functions },
{ "MD5:SSL3-MD5", "provider=default", ossl_md5_functions },
{ "MD5-SHA1", "provider=default", ossl_md5_sha1_functions },
#endif /* OPENSSL_NO_MD5 */
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM_CAPABLE deflt_ciphers[] = {
ALG("NULL", null_functions),
ALG("AES-256-ECB", aes256ecb_functions),
ALG("AES-192-ECB", aes192ecb_functions),
ALG("AES-128-ECB", aes128ecb_functions),
ALG("AES-256-CBC:AES256", aes256cbc_functions),
ALG("AES-192-CBC:AES192", aes192cbc_functions),
ALG("AES-128-CBC:AES128", aes128cbc_functions),
ALG("AES-128-CBC-CTS", aes128cbc_cts_functions),
ALG("AES-192-CBC-CTS", aes192cbc_cts_functions),
ALG("AES-256-CBC-CTS", aes256cbc_cts_functions),
ALG("AES-256-OFB", aes256ofb_functions),
ALG("AES-192-OFB", aes192ofb_functions),
ALG("AES-128-OFB", aes128ofb_functions),
ALG("AES-256-CFB", aes256cfb_functions),
ALG("AES-192-CFB", aes192cfb_functions),
ALG("AES-128-CFB", aes128cfb_functions),
ALG("AES-256-CFB1", aes256cfb1_functions),
ALG("AES-192-CFB1", aes192cfb1_functions),
ALG("AES-128-CFB1", aes128cfb1_functions),
ALG("AES-256-CFB8", aes256cfb8_functions),
ALG("AES-192-CFB8", aes192cfb8_functions),
ALG("AES-128-CFB8", aes128cfb8_functions),
ALG("AES-256-CTR", aes256ctr_functions),
ALG("AES-192-CTR", aes192ctr_functions),
ALG("AES-128-CTR", aes128ctr_functions),
ALG("AES-256-XTS", aes256xts_functions),
ALG("AES-128-XTS", aes128xts_functions),
ALG("NULL", ossl_null_functions),
ALG("AES-256-ECB", ossl_aes256ecb_functions),
ALG("AES-192-ECB", ossl_aes192ecb_functions),
ALG("AES-128-ECB", ossl_aes128ecb_functions),
ALG("AES-256-CBC:AES256", ossl_aes256cbc_functions),
ALG("AES-192-CBC:AES192", ossl_aes192cbc_functions),
ALG("AES-128-CBC:AES128", ossl_aes128cbc_functions),
ALG("AES-128-CBC-CTS", ossl_aes128cbc_cts_functions),
ALG("AES-192-CBC-CTS", ossl_aes192cbc_cts_functions),
ALG("AES-256-CBC-CTS", ossl_aes256cbc_cts_functions),
ALG("AES-256-OFB", ossl_aes256ofb_functions),
ALG("AES-192-OFB", ossl_aes192ofb_functions),
ALG("AES-128-OFB", ossl_aes128ofb_functions),
ALG("AES-256-CFB", ossl_aes256cfb_functions),
ALG("AES-192-CFB", ossl_aes192cfb_functions),
ALG("AES-128-CFB", ossl_aes128cfb_functions),
ALG("AES-256-CFB1", ossl_aes256cfb1_functions),
ALG("AES-192-CFB1", ossl_aes192cfb1_functions),
ALG("AES-128-CFB1", ossl_aes128cfb1_functions),
ALG("AES-256-CFB8", ossl_aes256cfb8_functions),
ALG("AES-192-CFB8", ossl_aes192cfb8_functions),
ALG("AES-128-CFB8", ossl_aes128cfb8_functions),
ALG("AES-256-CTR", ossl_aes256ctr_functions),
ALG("AES-192-CTR", ossl_aes192ctr_functions),
ALG("AES-128-CTR", ossl_aes128ctr_functions),
ALG("AES-256-XTS", ossl_aes256xts_functions),
ALG("AES-128-XTS", ossl_aes128xts_functions),
#ifndef OPENSSL_NO_OCB
ALG("AES-256-OCB", aes256ocb_functions),
ALG("AES-192-OCB", aes192ocb_functions),
ALG("AES-128-OCB", aes128ocb_functions),
ALG("AES-256-OCB", ossl_aes256ocb_functions),
ALG("AES-192-OCB", ossl_aes192ocb_functions),
ALG("AES-128-OCB", ossl_aes128ocb_functions),
#endif /* OPENSSL_NO_OCB */
#ifndef OPENSSL_NO_SIV
ALG("AES-128-SIV", aes128siv_functions),
ALG("AES-192-SIV", aes192siv_functions),
ALG("AES-256-SIV", aes256siv_functions),
ALG("AES-128-SIV", ossl_aes128siv_functions),
ALG("AES-192-SIV", ossl_aes192siv_functions),
ALG("AES-256-SIV", ossl_aes256siv_functions),
#endif /* OPENSSL_NO_SIV */
ALG("AES-256-GCM:id-aes256-GCM", aes256gcm_functions),
ALG("AES-192-GCM:id-aes192-GCM", aes192gcm_functions),
ALG("AES-128-GCM:id-aes128-GCM", aes128gcm_functions),
ALG("AES-256-CCM:id-aes256-CCM", aes256ccm_functions),
ALG("AES-192-CCM:id-aes192-CCM", aes192ccm_functions),
ALG("AES-128-CCM:id-aes128-CCM", aes128ccm_functions),
ALG("AES-256-WRAP:id-aes256-wrap:AES256-WRAP", aes256wrap_functions),
ALG("AES-192-WRAP:id-aes192-wrap:AES192-WRAP", aes192wrap_functions),
ALG("AES-128-WRAP:id-aes128-wrap:AES128-WRAP", aes128wrap_functions),
ALG("AES-256-GCM:id-aes256-GCM", ossl_aes256gcm_functions),
ALG("AES-192-GCM:id-aes192-GCM", ossl_aes192gcm_functions),
ALG("AES-128-GCM:id-aes128-GCM", ossl_aes128gcm_functions),
ALG("AES-256-CCM:id-aes256-CCM", ossl_aes256ccm_functions),
ALG("AES-192-CCM:id-aes192-CCM", ossl_aes192ccm_functions),
ALG("AES-128-CCM:id-aes128-CCM", ossl_aes128ccm_functions),
ALG("AES-256-WRAP:id-aes256-wrap:AES256-WRAP", ossl_aes256wrap_functions),
ALG("AES-192-WRAP:id-aes192-wrap:AES192-WRAP", ossl_aes192wrap_functions),
ALG("AES-128-WRAP:id-aes128-wrap:AES128-WRAP", ossl_aes128wrap_functions),
ALG("AES-256-WRAP-PAD:id-aes256-wrap-pad:AES256-WRAP-PAD",
aes256wrappad_functions),
ossl_aes256wrappad_functions),
ALG("AES-192-WRAP-PAD:id-aes192-wrap-pad:AES192-WRAP-PAD",
aes192wrappad_functions),
ossl_aes192wrappad_functions),
ALG("AES-128-WRAP-PAD:id-aes128-wrap-pad:AES128-WRAP-PAD",
aes128wrappad_functions),
ALGC("AES-128-CBC-HMAC-SHA1", aes128cbc_hmac_sha1_functions,
ossl_aes128wrappad_functions),
ALGC("AES-128-CBC-HMAC-SHA1", ossl_aes128cbc_hmac_sha1_functions,
cipher_capable_aes_cbc_hmac_sha1),
ALGC("AES-256-CBC-HMAC-SHA1", aes256cbc_hmac_sha1_functions,
ALGC("AES-256-CBC-HMAC-SHA1", ossl_aes256cbc_hmac_sha1_functions,
cipher_capable_aes_cbc_hmac_sha1),
ALGC("AES-128-CBC-HMAC-SHA256", aes128cbc_hmac_sha256_functions,
ALGC("AES-128-CBC-HMAC-SHA256", ossl_aes128cbc_hmac_sha256_functions,
cipher_capable_aes_cbc_hmac_sha256),
ALGC("AES-256-CBC-HMAC-SHA256", aes256cbc_hmac_sha256_functions,
ALGC("AES-256-CBC-HMAC-SHA256", ossl_aes256cbc_hmac_sha256_functions,
cipher_capable_aes_cbc_hmac_sha256),
#ifndef OPENSSL_NO_ARIA
ALG("ARIA-256-GCM", aria256gcm_functions),
ALG("ARIA-192-GCM", aria192gcm_functions),
ALG("ARIA-128-GCM", aria128gcm_functions),
ALG("ARIA-256-CCM", aria256ccm_functions),
ALG("ARIA-192-CCM", aria192ccm_functions),
ALG("ARIA-128-CCM", aria128ccm_functions),
ALG("ARIA-256-ECB", aria256ecb_functions),
ALG("ARIA-192-ECB", aria192ecb_functions),
ALG("ARIA-128-ECB", aria128ecb_functions),
ALG("ARIA-256-CBC:ARIA256", aria256cbc_functions),
ALG("ARIA-192-CBC:ARIA192", aria192cbc_functions),
ALG("ARIA-128-CBC:ARIA128", aria128cbc_functions),
ALG("ARIA-256-OFB", aria256ofb_functions),
ALG("ARIA-192-OFB", aria192ofb_functions),
ALG("ARIA-128-OFB", aria128ofb_functions),
ALG("ARIA-256-CFB", aria256cfb_functions),
ALG("ARIA-192-CFB", aria192cfb_functions),
ALG("ARIA-128-CFB", aria128cfb_functions),
ALG("ARIA-256-CFB1", aria256cfb1_functions),
ALG("ARIA-192-CFB1", aria192cfb1_functions),
ALG("ARIA-128-CFB1", aria128cfb1_functions),
ALG("ARIA-256-CFB8", aria256cfb8_functions),
ALG("ARIA-192-CFB8", aria192cfb8_functions),
ALG("ARIA-128-CFB8", aria128cfb8_functions),
ALG("ARIA-256-CTR", aria256ctr_functions),
ALG("ARIA-192-CTR", aria192ctr_functions),
ALG("ARIA-128-CTR", aria128ctr_functions),
ALG("ARIA-256-GCM", ossl_aria256gcm_functions),
ALG("ARIA-192-GCM", ossl_aria192gcm_functions),
ALG("ARIA-128-GCM", ossl_aria128gcm_functions),
ALG("ARIA-256-CCM", ossl_aria256ccm_functions),
ALG("ARIA-192-CCM", ossl_aria192ccm_functions),
ALG("ARIA-128-CCM", ossl_aria128ccm_functions),
ALG("ARIA-256-ECB", ossl_aria256ecb_functions),
ALG("ARIA-192-ECB", ossl_aria192ecb_functions),
ALG("ARIA-128-ECB", ossl_aria128ecb_functions),
ALG("ARIA-256-CBC:ARIA256", ossl_aria256cbc_functions),
ALG("ARIA-192-CBC:ARIA192", ossl_aria192cbc_functions),
ALG("ARIA-128-CBC:ARIA128", ossl_aria128cbc_functions),
ALG("ARIA-256-OFB", ossl_aria256ofb_functions),
ALG("ARIA-192-OFB", ossl_aria192ofb_functions),
ALG("ARIA-128-OFB", ossl_aria128ofb_functions),
ALG("ARIA-256-CFB", ossl_aria256cfb_functions),
ALG("ARIA-192-CFB", ossl_aria192cfb_functions),
ALG("ARIA-128-CFB", ossl_aria128cfb_functions),
ALG("ARIA-256-CFB1", ossl_aria256cfb1_functions),
ALG("ARIA-192-CFB1", ossl_aria192cfb1_functions),
ALG("ARIA-128-CFB1", ossl_aria128cfb1_functions),
ALG("ARIA-256-CFB8", ossl_aria256cfb8_functions),
ALG("ARIA-192-CFB8", ossl_aria192cfb8_functions),
ALG("ARIA-128-CFB8", ossl_aria128cfb8_functions),
ALG("ARIA-256-CTR", ossl_aria256ctr_functions),
ALG("ARIA-192-CTR", ossl_aria192ctr_functions),
ALG("ARIA-128-CTR", ossl_aria128ctr_functions),
#endif /* OPENSSL_NO_ARIA */
#ifndef OPENSSL_NO_CAMELLIA
ALG("CAMELLIA-256-ECB", camellia256ecb_functions),
ALG("CAMELLIA-192-ECB", camellia192ecb_functions),
ALG("CAMELLIA-128-ECB", camellia128ecb_functions),
ALG("CAMELLIA-256-CBC:CAMELLIA256", camellia256cbc_functions),
ALG("CAMELLIA-192-CBC:CAMELLIA192", camellia192cbc_functions),
ALG("CAMELLIA-128-CBC:CAMELLIA128", camellia128cbc_functions),
ALG("CAMELLIA-256-OFB", camellia256ofb_functions),
ALG("CAMELLIA-192-OFB", camellia192ofb_functions),
ALG("CAMELLIA-128-OFB", camellia128ofb_functions),
ALG("CAMELLIA-256-CFB", camellia256cfb_functions),
ALG("CAMELLIA-192-CFB", camellia192cfb_functions),
ALG("CAMELLIA-128-CFB", camellia128cfb_functions),
ALG("CAMELLIA-256-CFB1", camellia256cfb1_functions),
ALG("CAMELLIA-192-CFB1", camellia192cfb1_functions),
ALG("CAMELLIA-128-CFB1", camellia128cfb1_functions),
ALG("CAMELLIA-256-CFB8", camellia256cfb8_functions),
ALG("CAMELLIA-192-CFB8", camellia192cfb8_functions),
ALG("CAMELLIA-128-CFB8", camellia128cfb8_functions),
ALG("CAMELLIA-256-CTR", camellia256ctr_functions),
ALG("CAMELLIA-192-CTR", camellia192ctr_functions),
ALG("CAMELLIA-128-CTR", camellia128ctr_functions),
ALG("CAMELLIA-256-ECB", ossl_camellia256ecb_functions),
ALG("CAMELLIA-192-ECB", ossl_camellia192ecb_functions),
ALG("CAMELLIA-128-ECB", ossl_camellia128ecb_functions),
ALG("CAMELLIA-256-CBC:CAMELLIA256", ossl_camellia256cbc_functions),
ALG("CAMELLIA-192-CBC:CAMELLIA192", ossl_camellia192cbc_functions),
ALG("CAMELLIA-128-CBC:CAMELLIA128", ossl_camellia128cbc_functions),
ALG("CAMELLIA-256-OFB", ossl_camellia256ofb_functions),
ALG("CAMELLIA-192-OFB", ossl_camellia192ofb_functions),
ALG("CAMELLIA-128-OFB", ossl_camellia128ofb_functions),
ALG("CAMELLIA-256-CFB", ossl_camellia256cfb_functions),
ALG("CAMELLIA-192-CFB", ossl_camellia192cfb_functions),
ALG("CAMELLIA-128-CFB", ossl_camellia128cfb_functions),
ALG("CAMELLIA-256-CFB1", ossl_camellia256cfb1_functions),
ALG("CAMELLIA-192-CFB1", ossl_camellia192cfb1_functions),
ALG("CAMELLIA-128-CFB1", ossl_camellia128cfb1_functions),
ALG("CAMELLIA-256-CFB8", ossl_camellia256cfb8_functions),
ALG("CAMELLIA-192-CFB8", ossl_camellia192cfb8_functions),
ALG("CAMELLIA-128-CFB8", ossl_camellia128cfb8_functions),
ALG("CAMELLIA-256-CTR", ossl_camellia256ctr_functions),
ALG("CAMELLIA-192-CTR", ossl_camellia192ctr_functions),
ALG("CAMELLIA-128-CTR", ossl_camellia128ctr_functions),
#endif /* OPENSSL_NO_CAMELLIA */
#ifndef OPENSSL_NO_DES
ALG("DES-EDE3-ECB:DES-EDE3", tdes_ede3_ecb_functions),
ALG("DES-EDE3-CBC:DES3", tdes_ede3_cbc_functions),
ALG("DES-EDE3-OFB", tdes_ede3_ofb_functions),
ALG("DES-EDE3-CFB", tdes_ede3_cfb_functions),
ALG("DES-EDE3-CFB8", tdes_ede3_cfb8_functions),
ALG("DES-EDE3-CFB1", tdes_ede3_cfb1_functions),
ALG("DES3-WRAP:id-smime-alg-CMS3DESwrap", tdes_wrap_cbc_functions),
ALG("DES-EDE-ECB:DES-EDE", tdes_ede2_ecb_functions),
ALG("DES-EDE-CBC", tdes_ede2_cbc_functions),
ALG("DES-EDE-OFB", tdes_ede2_ofb_functions),
ALG("DES-EDE-CFB", tdes_ede2_cfb_functions),
ALG("DES-EDE3-ECB:DES-EDE3", ossl_tdes_ede3_ecb_functions),
ALG("DES-EDE3-CBC:DES3", ossl_tdes_ede3_cbc_functions),
ALG("DES-EDE3-OFB", ossl_tdes_ede3_ofb_functions),
ALG("DES-EDE3-CFB", ossl_tdes_ede3_cfb_functions),
ALG("DES-EDE3-CFB8", ossl_tdes_ede3_cfb8_functions),
ALG("DES-EDE3-CFB1", ossl_tdes_ede3_cfb1_functions),
ALG("DES3-WRAP:id-smime-alg-CMS3DESwrap", ossl_tdes_wrap_cbc_functions),
ALG("DES-EDE-ECB:DES-EDE", ossl_tdes_ede2_ecb_functions),
ALG("DES-EDE-CBC", ossl_tdes_ede2_cbc_functions),
ALG("DES-EDE-OFB", ossl_tdes_ede2_ofb_functions),
ALG("DES-EDE-CFB", ossl_tdes_ede2_cfb_functions),
#endif /* OPENSSL_NO_DES */
#ifndef OPENSSL_NO_SM4
ALG("SM4-ECB", sm4128ecb_functions),
ALG("SM4-CBC:SM4", sm4128cbc_functions),
ALG("SM4-CTR", sm4128ctr_functions),
ALG("SM4-OFB:SM4-OFB128", sm4128ofb128_functions),
ALG("SM4-CFB:SM4-CFB128", sm4128cfb128_functions),
ALG("SM4-ECB", ossl_sm4128ecb_functions),
ALG("SM4-CBC:SM4", ossl_sm4128cbc_functions),
ALG("SM4-CTR", ossl_sm4128ctr_functions),
ALG("SM4-OFB:SM4-OFB128", ossl_sm4128ofb128_functions),
ALG("SM4-CFB:SM4-CFB128", ossl_sm4128cfb128_functions),
#endif /* OPENSSL_NO_SM4 */
#ifndef OPENSSL_NO_CHACHA
ALG("ChaCha20", chacha20_functions),
ALG("ChaCha20", ossl_chacha20_functions),
# ifndef OPENSSL_NO_POLY1305
ALG("ChaCha20-Poly1305", chacha20_poly1305_functions),
ALG("ChaCha20-Poly1305", ossl_chacha20_ossl_poly1305_functions),
# endif /* OPENSSL_NO_POLY1305 */
#endif /* OPENSSL_NO_CHACHA */
{ { NULL, NULL, NULL }, NULL }
@ -294,93 +296,96 @@ static OSSL_ALGORITHM exported_ciphers[OSSL_NELEM(deflt_ciphers)];
static const OSSL_ALGORITHM deflt_macs[] = {
#ifndef OPENSSL_NO_BLAKE2
{ "BLAKE2BMAC", "provider=default", blake2bmac_functions },
{ "BLAKE2SMAC", "provider=default", blake2smac_functions },
{ "BLAKE2BMAC", "provider=default", ossl_blake2bmac_functions },
{ "BLAKE2SMAC", "provider=default", ossl_blake2smac_functions },
#endif
#ifndef OPENSSL_NO_CMAC
{ "CMAC", "provider=default", cmac_functions },
{ "CMAC", "provider=default", ossl_cmac_functions },
#endif
{ "GMAC", "provider=default", gmac_functions },
{ "HMAC", "provider=default", hmac_functions },
{ "KMAC-128:KMAC128", "provider=default", kmac128_functions },
{ "KMAC-256:KMAC256", "provider=default", kmac256_functions },
{ "GMAC", "provider=default", ossl_gmac_functions },
{ "HMAC", "provider=default", ossl_hmac_functions },
{ "KMAC-128:KMAC128", "provider=default", ossl_kmac128_functions },
{ "KMAC-256:KMAC256", "provider=default", ossl_kmac256_functions },
#ifndef OPENSSL_NO_SIPHASH
{ "SIPHASH", "provider=default", siphash_functions },
{ "SIPHASH", "provider=default", ossl_siphash_functions },
#endif
#ifndef OPENSSL_NO_POLY1305
{ "POLY1305", "provider=default", poly1305_functions },
{ "POLY1305", "provider=default", ossl_poly1305_functions },
#endif
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM deflt_kdfs[] = {
{ "HKDF", "provider=default", kdf_hkdf_functions },
{ "SSKDF", "provider=default", kdf_sskdf_functions },
{ "PBKDF2", "provider=default", kdf_pbkdf2_functions },
{ "PKCS12KDF", "provider=default", kdf_pkcs12_functions },
{ "SSHKDF", "provider=default", kdf_sshkdf_functions },
{ "X963KDF", "provider=default", kdf_x963_kdf_functions },
{ "TLS1-PRF", "provider=default", kdf_tls1_prf_functions },
{ "KBKDF", "provider=default", kdf_kbkdf_functions },
{ "HKDF", "provider=default", ossl_kdf_hkdf_functions },
{ "SSKDF", "provider=default", ossl_kdf_sskdf_functions },
{ "PBKDF2", "provider=default", ossl_kdf_pbkdf2_functions },
{ "PKCS12KDF", "provider=default", ossl_kdf_pkcs12_functions },
{ "SSHKDF", "provider=default", ossl_kdf_sshkdf_functions },
{ "X963KDF", "provider=default", ossl_kdf_x963_kdf_functions },
{ "TLS1-PRF", "provider=default", ossl_kdf_tls1_prf_functions },
{ "KBKDF", "provider=default", ossl_kdf_kbkdf_functions },
#ifndef OPENSSL_NO_CMS
{ "X942KDF", "provider=default", kdf_x942_kdf_functions },
{ "X942KDF", "provider=default", ossl_kdf_x942_kdf_functions },
#endif
#ifndef OPENSSL_NO_SCRYPT
{ "SCRYPT:id-scrypt", "provider=default", kdf_scrypt_functions },
{ "SCRYPT:id-scrypt", "provider=default", ossl_kdf_scrypt_functions },
#endif
{ "KRB5KDF", "provider=default", kdf_krb5kdf_functions },
{ "KRB5KDF", "provider=default", ossl_kdf_krb5kdf_functions },
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM deflt_keyexch[] = {
#ifndef OPENSSL_NO_DH
{ "DH:dhKeyAgreement", "provider=default", dh_keyexch_functions },
{ "DH:dhKeyAgreement", "provider=default", ossl_dh_keyexch_functions },
#endif
#ifndef OPENSSL_NO_EC
{ "ECDH", "provider=default", ecdh_keyexch_functions },
{ "X25519", "provider=default", x25519_keyexch_functions },
{ "X448", "provider=default", x448_keyexch_functions },
{ "ECDH", "provider=default", ecossl_dh_keyexch_functions },
{ "X25519", "provider=default", ossl_x25519_keyexch_functions },
{ "X448", "provider=default", ossl_x448_keyexch_functions },
#endif
{ "TLS1-PRF", "provider=default", kdf_tls1_prf_keyexch_functions },
{ "HKDF", "provider=default", kdf_hkdf_keyexch_functions },
{ "SCRYPT:id-scrypt", "provider=default", kdf_scrypt_keyexch_functions },
{ "TLS1-PRF", "provider=default", ossl_kdf_tls1_prf_keyexch_functions },
{ "HKDF", "provider=default", ossl_kdf_hkdf_keyexch_functions },
{ "SCRYPT:id-scrypt", "provider=default",
ossl_kdf_scrypt_keyexch_functions },
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM deflt_rands[] = {
{ "CTR-DRBG", "provider=default", drbg_ctr_functions },
{ "HASH-DRBG", "provider=default", drbg_hash_functions },
{ "HMAC-DRBG", "provider=default", drbg_hmac_functions },
{ "TEST-RAND", "provider=default", test_rng_functions },
{ "CTR-DRBG", "provider=default", ossl_drbg_ctr_functions },
{ "HASH-DRBG", "provider=default", ossl_drbg_hash_functions },
{ "HMAC-DRBG", "provider=default", ossl_drbg_ossl_hmac_functions },
{ "TEST-RAND", "provider=default", ossl_test_rng_functions },
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM deflt_signature[] = {
#ifndef OPENSSL_NO_DSA
{ "DSA:dsaEncryption", "provider=default", dsa_signature_functions },
{ "DSA:dsaEncryption", "provider=default", ossl_dsa_signature_functions },
#endif
{ "RSA:rsaEncryption", "provider=default", rsa_signature_functions },
{ "RSA:rsaEncryption", "provider=default", ossl_rsa_signature_functions },
#ifndef OPENSSL_NO_EC
{ "ED25519:Ed25519", "provider=default", ed25519_signature_functions },
{ "ED448:Ed448", "provider=default", ed448_signature_functions },
{ "ECDSA", "provider=default", ecdsa_signature_functions },
{ "ED25519:Ed25519", "provider=default", ossl_ed25519_signature_functions },
{ "ED448:Ed448", "provider=default", ossl_ed448_signature_functions },
{ "ECDSA", "provider=default", ecossl_dsa_signature_functions },
# ifndef OPENSSL_NO_SM2
{ "SM2", "provider=default", sm2_signature_functions },
# endif
#endif
{ "HMAC", "provider=default", mac_legacy_hmac_signature_functions },
{ "SIPHASH", "provider=default", mac_legacy_siphash_signature_functions },
{ "HMAC", "provider=default", ossl_mac_legacy_hmac_signature_functions },
{ "SIPHASH", "provider=default",
ossl_mac_legacy_siphash_signature_functions },
#ifndef OPENSSL_NO_POLY1305
{ "POLY1305", "provider=default", mac_legacy_poly1305_signature_functions },
{ "POLY1305", "provider=default",
ossl_mac_legacy_poly1305_signature_functions },
#endif
#ifndef OPENSSL_NO_CMAC
{ "CMAC", "provider=default", mac_legacy_cmac_signature_functions },
{ "CMAC", "provider=default", ossl_mac_legacy_cmac_signature_functions },
#endif
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM deflt_asym_cipher[] = {
{ "RSA:rsaEncryption", "provider=default", rsa_asym_cipher_functions },
{ "RSA:rsaEncryption", "provider=default", ossl_rsa_asym_cipher_functions },
#ifndef OPENSSL_NO_SM2
{ "SM2", "provider=default", sm2_asym_cipher_functions },
#endif
@ -388,37 +393,38 @@ static const OSSL_ALGORITHM deflt_asym_cipher[] = {
};
static const OSSL_ALGORITHM deflt_asym_kem[] = {
{ "RSA", "provider=default", rsa_asym_kem_functions },
{ "RSA", "provider=default", ossl_rsa_asym_kem_functions },
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM deflt_keymgmt[] = {
#ifndef OPENSSL_NO_DH
{ "DH:dhKeyAgreement", "provider=default", dh_keymgmt_functions },
{ "DHX:X9.42 DH:dhpublicnumber", "provider=default", dhx_keymgmt_functions },
{ "DH:dhKeyAgreement", "provider=default", ossl_dh_keymgmt_functions },
{ "DHX:X9.42 DH:dhpublicnumber", "provider=default",
ossl_dhx_keymgmt_functions },
#endif
#ifndef OPENSSL_NO_DSA
{ "DSA:dsaEncryption", "provider=default", dsa_keymgmt_functions },
{ "DSA:dsaEncryption", "provider=default", ossl_dsa_keymgmt_functions },
#endif
{ "RSA:rsaEncryption", "provider=default", rsa_keymgmt_functions },
{ "RSA-PSS:RSASSA-PSS", "provider=default", rsapss_keymgmt_functions },
{ "RSA:rsaEncryption", "provider=default", ossl_rsa_keymgmt_functions },
{ "RSA-PSS:RSASSA-PSS", "provider=default", ossl_rsapss_keymgmt_functions },
#ifndef OPENSSL_NO_EC
{ "EC:id-ecPublicKey", "provider=default", ec_keymgmt_functions },
{ "X25519", "provider=default", x25519_keymgmt_functions },
{ "X448", "provider=default", x448_keymgmt_functions },
{ "ED25519", "provider=default", ed25519_keymgmt_functions },
{ "ED448", "provider=default", ed448_keymgmt_functions },
{ "EC:id-ecPublicKey", "provider=default", ossl_ec_keymgmt_functions },
{ "X25519", "provider=default", ossl_x25519_keymgmt_functions },
{ "X448", "provider=default", ossl_x448_keymgmt_functions },
{ "ED25519", "provider=default", ossl_ed25519_keymgmt_functions },
{ "ED448", "provider=default", ossl_ed448_keymgmt_functions },
#endif
{ "TLS1-PRF", "provider=default", kdf_keymgmt_functions },
{ "HKDF", "provider=default", kdf_keymgmt_functions },
{ "SCRYPT:id-scrypt", "provider=default", kdf_keymgmt_functions },
{ "HMAC", "provider=default", mac_legacy_keymgmt_functions },
{ "SIPHASH", "provider=default", mac_legacy_keymgmt_functions },
{ "TLS1-PRF", "provider=default", ossl_kdf_keymgmt_functions },
{ "HKDF", "provider=default", ossl_kdf_keymgmt_functions },
{ "SCRYPT:id-scrypt", "provider=default", ossl_kdf_keymgmt_functions },
{ "HMAC", "provider=default", ossl_mac_legacy_keymgmt_functions },
{ "SIPHASH", "provider=default", ossl_mac_legacy_keymgmt_functions },
#ifndef OPENSSL_NO_POLY1305
{ "POLY1305", "provider=default", mac_legacy_keymgmt_functions },
{ "POLY1305", "provider=default", ossl_mac_legacy_keymgmt_functions },
#endif
#ifndef OPENSSL_NO_CMAC
{ "CMAC", "provider=default", cmac_legacy_keymgmt_functions },
{ "CMAC", "provider=default", ossl_cossl_mac_legacy_keymgmt_functions },
#endif
#ifndef OPENSSL_NO_SM2
{ "SM2", "provider=default", sm2_keymgmt_functions },


+ 30
- 30
providers/encoders.inc View File

@ -11,47 +11,47 @@
# error Macro ENCODER undefined
#endif
ENCODER("RSA", "yes", "text", rsa_to_text_encoder_functions),
ENCODER("RSA", "yes", "der", rsa_to_der_encoder_functions),
ENCODER("RSA", "yes", "pem", rsa_to_pem_encoder_functions),
ENCODER("RSA-PSS", "yes", "text", rsapss_to_text_encoder_functions),
ENCODER("RSA-PSS", "yes", "der", rsapss_to_der_encoder_functions),
ENCODER("RSA-PSS", "yes", "pem", rsapss_to_pem_encoder_functions),
ENCODER("RSA", "yes", "text", ossl_rsa_to_text_encoder_functions),
ENCODER("RSA", "yes", "der", ossl_rsa_to_der_encoder_functions),
ENCODER("RSA", "yes", "pem", ossl_rsa_to_pem_encoder_functions),
ENCODER("RSA-PSS", "yes", "text", ossl_rsapss_to_text_encoder_functions),
ENCODER("RSA-PSS", "yes", "der", ossl_rsapss_to_der_encoder_functions),
ENCODER("RSA-PSS", "yes", "pem", ossl_rsapss_to_pem_encoder_functions),
#ifndef OPENSSL_NO_DH
ENCODER("DH", "yes", "text", dh_to_text_encoder_functions),
ENCODER("DH", "yes", "der", dh_to_der_encoder_functions),
ENCODER("DH", "yes", "pem", dh_to_pem_encoder_functions),
ENCODER("DH", "yes", "text", ossl_dh_to_text_encoder_functions),
ENCODER("DH", "yes", "der", ossl_dh_to_der_encoder_functions),
ENCODER("DH", "yes", "pem", ossl_dh_to_pem_encoder_functions),
ENCODER("DHX", "yes", "text", dhx_to_text_encoder_functions),
ENCODER("DHX", "yes", "der", dhx_to_der_encoder_functions),
ENCODER("DHX", "yes", "pem", dhx_to_pem_encoder_functions),
ENCODER("DHX", "yes", "text", ossl_dhx_to_text_encoder_functions),
ENCODER("DHX", "yes", "der", ossl_dhx_to_der_encoder_functions),
ENCODER("DHX", "yes", "pem", ossl_dhx_to_pem_encoder_functions),
#endif
#ifndef OPENSSL_NO_DSA
ENCODER("DSA", "yes", "text", dsa_to_text_encoder_functions),
ENCODER("DSA", "yes", "der", dsa_to_der_encoder_functions),
ENCODER("DSA", "yes", "pem", dsa_to_pem_encoder_functions),
ENCODER("DSA", "yes", "text", ossl_dsa_to_text_encoder_functions),
ENCODER("DSA", "yes", "der", ossl_dsa_to_der_encoder_functions),
ENCODER("DSA", "yes", "pem", ossl_dsa_to_pem_encoder_functions),
#endif
#ifndef OPENSSL_NO_EC
ENCODER("X25519", "yes", "text", x25519_to_text_encoder_functions),
ENCODER("X25519", "yes", "der", x25519_to_der_encoder_functions),
ENCODER("X25519", "yes", "pem", x25519_to_pem_encoder_functions),
ENCODER("X25519", "yes", "text", ossl_x25519_to_text_encoder_functions),
ENCODER("X25519", "yes", "der", ossl_x25519_to_der_encoder_functions),
ENCODER("X25519", "yes", "pem", ossl_x25519_to_pem_encoder_functions),
ENCODER("X448", "yes", "text", x448_to_text_encoder_functions),
ENCODER("X448", "yes", "der", x448_to_der_encoder_functions),
ENCODER("X448", "yes", "pem", x448_to_pem_encoder_functions),
ENCODER("X448", "yes", "text", ossl_x448_to_text_encoder_functions),
ENCODER("X448", "yes", "der", ossl_x448_to_der_encoder_functions),
ENCODER("X448", "yes", "pem", ossl_x448_to_pem_encoder_functions),
ENCODER("ED25519", "yes", "text", ed25519_to_text_encoder_functions),
ENCODER("ED25519", "yes", "der", ed25519_to_der_encoder_functions),
ENCODER("ED25519", "yes", "pem", ed25519_to_pem_encoder_functions),
ENCODER("ED25519", "yes", "text", ossl_ed25519_to_text_encoder_functions),
ENCODER("ED25519", "yes", "der", ossl_ed25519_to_der_encoder_functions),
ENCODER("ED25519", "yes", "pem", ossl_ed25519_to_pem_encoder_functions),
ENCODER("ED448", "yes", "text", ed448_to_text_encoder_functions),
ENCODER("ED448", "yes", "der", ed448_to_der_encoder_functions),
ENCODER("ED448", "yes", "pem", ed448_to_pem_encoder_functions),
ENCODER("ED448", "yes", "text", ossl_ed448_to_text_encoder_functions),
ENCODER("ED448", "yes", "der", ossl_ed448_to_der_encoder_functions),
ENCODER("ED448", "yes", "pem", ossl_ed448_to_pem_encoder_functions),
ENCODER("EC", "yes", "text", ec_to_text_encoder_functions),
ENCODER("EC", "yes", "der", ec_to_der_encoder_functions),
ENCODER("EC", "yes", "pem", ec_to_pem_encoder_functions),
ENCODER("EC", "yes", "text", ossl_ec_to_text_encoder_functions),
ENCODER("EC", "yes", "der", ossl_ec_to_der_encoder_functions),
ENCODER("EC", "yes", "pem", ossl_ec_to_pem_encoder_functions),
#endif

+ 117
- 104
providers/fips/fipsprov.c View File

@ -307,90 +307,94 @@ const char *ossl_prov_util_nid_to_name(int nid)
*/
static const OSSL_ALGORITHM fips_digests[] = {
/* Our primary name:NiST name[:our older names] */
{ "SHA1:SHA-1:SSL3-SHA1", FIPS_DEFAULT_PROPERTIES, sha1_functions },
{ "SHA2-224:SHA-224:SHA224", FIPS_DEFAULT_PROPERTIES, sha224_functions },
{ "SHA2-256:SHA-256:SHA256", FIPS_DEFAULT_PROPERTIES, sha256_functions },
{ "SHA2-384:SHA-384:SHA384", FIPS_DEFAULT_PROPERTIES, sha384_functions },
{ "SHA2-512:SHA-512:SHA512", FIPS_DEFAULT_PROPERTIES, sha512_functions },
{ "SHA1:SHA-1:SSL3-SHA1", FIPS_DEFAULT_PROPERTIES, ossl_sha1_functions },
{ "SHA2-224:SHA-224:SHA224", FIPS_DEFAULT_PROPERTIES,
ossl_sha224_functions },
{ "SHA2-256:SHA-256:SHA256", FIPS_DEFAULT_PROPERTIES,
ossl_sha256_functions },
{ "SHA2-384:SHA-384:SHA384", FIPS_DEFAULT_PROPERTIES,
ossl_sha384_functions },
{ "SHA2-512:SHA-512:SHA512", FIPS_DEFAULT_PROPERTIES,
ossl_sha512_functions },
{ "SHA2-512/224:SHA-512/224:SHA512-224", FIPS_DEFAULT_PROPERTIES,
sha512_224_functions },
ossl_sha512_224_functions },
{ "SHA2-512/256:SHA-512/256:SHA512-256", FIPS_DEFAULT_PROPERTIES,
sha512_256_functions },
ossl_sha512_256_functions },
/* We agree with NIST here, so one name only */
{ "SHA3-224", FIPS_DEFAULT_PROPERTIES, sha3_224_functions },
{ "SHA3-256", FIPS_DEFAULT_PROPERTIES, sha3_256_functions },
{ "SHA3-384", FIPS_DEFAULT_PROPERTIES, sha3_384_functions },
{ "SHA3-512", FIPS_DEFAULT_PROPERTIES, sha3_512_functions },
{ "SHA3-224", FIPS_DEFAULT_PROPERTIES, ossl_sha3_224_functions },
{ "SHA3-256", FIPS_DEFAULT_PROPERTIES, ossl_sha3_256_functions },
{ "SHA3-384", FIPS_DEFAULT_PROPERTIES, ossl_sha3_384_functions },
{ "SHA3-512", FIPS_DEFAULT_PROPERTIES, ossl_sha3_512_functions },
{ "SHAKE-128:SHAKE128", FIPS_DEFAULT_PROPERTIES, shake_128_functions },
{ "SHAKE-256:SHAKE256", FIPS_DEFAULT_PROPERTIES, shake_256_functions },
{ "SHAKE-128:SHAKE128", FIPS_DEFAULT_PROPERTIES, ossl_shake_128_functions },
{ "SHAKE-256:SHAKE256", FIPS_DEFAULT_PROPERTIES, ossl_shake_256_functions },
/*
* KECCAK-KMAC-128 and KECCAK-KMAC-256 as hashes are mostly useful for
* KMAC128 and KMAC256.
*/
{ "KECCAK-KMAC-128:KECCAK-KMAC128", FIPS_DEFAULT_PROPERTIES,
keccak_kmac_128_functions },
ossl_keccak_kmac_128_functions },
{ "KECCAK-KMAC-256:KECCAK-KMAC256", FIPS_DEFAULT_PROPERTIES,
keccak_kmac_256_functions },
ossl_keccak_kmac_256_functions },
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM_CAPABLE fips_ciphers[] = {
/* Our primary name[:ASN.1 OID name][:our older names] */
ALG("AES-256-ECB", aes256ecb_functions),
ALG("AES-192-ECB", aes192ecb_functions),
ALG("AES-128-ECB", aes128ecb_functions),
ALG("AES-256-CBC:AES256", aes256cbc_functions),
ALG("AES-192-CBC:AES192", aes192cbc_functions),
ALG("AES-128-CBC:AES128", aes128cbc_functions),
ALG("AES-256-CBC-CTS", aes256cbc_cts_functions),
ALG("AES-192-CBC-CTS", aes192cbc_cts_functions),
ALG("AES-128-CBC-CTS", aes128cbc_cts_functions),
ALG("AES-256-OFB", aes256ofb_functions),
ALG("AES-192-OFB", aes192ofb_functions),
ALG("AES-128-OFB", aes128ofb_functions),
ALG("AES-256-CFB", aes256cfb_functions),
ALG("AES-192-CFB", aes192cfb_functions),
ALG("AES-128-CFB", aes128cfb_functions),
ALG("AES-256-CFB1", aes256cfb1_functions),
ALG("AES-192-CFB1", aes192cfb1_functions),
ALG("AES-128-CFB1", aes128cfb1_functions),
ALG("AES-256-CFB8", aes256cfb8_functions),
ALG("AES-192-CFB8", aes192cfb8_functions),
ALG("AES-128-CFB8", aes128cfb8_functions),
ALG("AES-256-CTR", aes256ctr_functions),
ALG("AES-192-CTR", aes192ctr_functions),
ALG("AES-128-CTR", aes128ctr_functions),
ALG("AES-256-XTS", aes256xts_functions),
ALG("AES-128-XTS", aes128xts_functions),
ALG("AES-256-GCM:id-aes256-GCM", aes256gcm_functions),
ALG("AES-192-GCM:id-aes192-GCM", aes192gcm_functions),
ALG("AES-128-GCM:id-aes128-GCM", aes128gcm_functions),
ALG("AES-256-CCM:id-aes256-CCM", aes256ccm_functions),
ALG("AES-192-CCM:id-aes192-CCM", aes192ccm_functions),
ALG("AES-128-CCM:id-aes128-CCM", aes128ccm_functions),
ALG("AES-256-WRAP:id-aes256-wrap:AES256-WRAP", aes256wrap_functions),
ALG("AES-192-WRAP:id-aes192-wrap:AES192-WRAP", aes192wrap_functions),
ALG("AES-128-WRAP:id-aes128-wrap:AES128-WRAP", aes128wrap_functions),
ALG("AES-256-ECB", ossl_aes256ecb_functions),
ALG("AES-192-ECB", ossl_aes192ecb_functions),
ALG("AES-128-ECB", ossl_aes128ecb_functions),
ALG("AES-256-CBC:AES256", ossl_aes256cbc_functions),
ALG("AES-192-CBC:AES192", ossl_aes192cbc_functions),
ALG("AES-128-CBC:AES128", ossl_aes128cbc_functions),
ALG("AES-256-CBC-CTS", ossl_aes256cbc_cts_functions),
ALG("AES-192-CBC-CTS", ossl_aes192cbc_cts_functions),
ALG("AES-128-CBC-CTS", ossl_aes128cbc_cts_functions),
ALG("AES-256-OFB", ossl_aes256ofb_functions),
ALG("AES-192-OFB", ossl_aes192ofb_functions),
ALG("AES-128-OFB", ossl_aes128ofb_functions),
ALG("AES-256-CFB", ossl_aes256cfb_functions),
ALG("AES-192-CFB", ossl_aes192cfb_functions),
ALG("AES-128-CFB", ossl_aes128cfb_functions),
ALG("AES-256-CFB1", ossl_aes256cfb1_functions),
ALG("AES-192-CFB1", ossl_aes192cfb1_functions),
ALG("AES-128-CFB1", ossl_aes128cfb1_functions),
ALG("AES-256-CFB8", ossl_aes256cfb8_functions),
ALG("AES-192-CFB8", ossl_aes192cfb8_functions),
ALG("AES-128-CFB8", ossl_aes128cfb8_functions),
ALG("AES-256-CTR", ossl_aes256ctr_functions),
ALG("AES-192-CTR", ossl_aes192ctr_functions),
ALG("AES-128-CTR", ossl_aes128ctr_functions),
ALG("AES-256-XTS", ossl_aes256xts_functions),
ALG("AES-128-XTS", ossl_aes128xts_functions),
ALG("AES-256-GCM:id-aes256-GCM", ossl_aes256gcm_functions),
ALG("AES-192-GCM:id-aes192-GCM", ossl_aes192gcm_functions),
ALG("AES-128-GCM:id-aes128-GCM", ossl_aes128gcm_functions),
ALG("AES-256-CCM:id-aes256-CCM", ossl_aes256ccm_functions),
ALG("AES-192-CCM:id-aes192-CCM", ossl_aes192ccm_functions),
ALG("AES-128-CCM:id-aes128-CCM", ossl_aes128ccm_functions),
ALG("AES-256-WRAP:id-aes256-wrap:AES256-WRAP", ossl_aes256wrap_functions),
ALG("AES-192-WRAP:id-aes192-wrap:AES192-WRAP", ossl_aes192wrap_functions),
ALG("AES-128-WRAP:id-aes128-wrap:AES128-WRAP", ossl_aes128wrap_functions),
ALG("AES-256-WRAP-PAD:id-aes256-wrap-pad:AES256-WRAP-PAD",
aes256wrappad_functions),
ossl_aes256wrappad_functions),
ALG("AES-192-WRAP-PAD:id-aes192-wrap-pad:AES192-WRAP-PAD",
aes192wrappad_functions),
ossl_aes192wrappad_functions),
ALG("AES-128-WRAP-PAD:id-aes128-wrap-pad:AES128-WRAP-PAD",
aes128wrappad_functions),
ALGC("AES-128-CBC-HMAC-SHA1", aes128cbc_hmac_sha1_functions,
ossl_aes128wrappad_functions),
ALGC("AES-128-CBC-HMAC-SHA1", ossl_aes128cbc_hmac_sha1_functions,
cipher_capable_aes_cbc_hmac_sha1),
ALGC("AES-256-CBC-HMAC-SHA1", aes256cbc_hmac_sha1_functions,
ALGC("AES-256-CBC-HMAC-SHA1", ossl_aes256cbc_hmac_sha1_functions,
cipher_capable_aes_cbc_hmac_sha1),
ALGC("AES-128-CBC-HMAC-SHA256", aes128cbc_hmac_sha256_functions,
ALGC("AES-128-CBC-HMAC-SHA256", ossl_aes128cbc_hmac_sha256_functions,
cipher_capable_aes_cbc_hmac_sha256),
ALGC("AES-256-CBC-HMAC-SHA256", aes256cbc_hmac_sha256_functions,
ALGC("AES-256-CBC-HMAC-SHA256", ossl_aes256cbc_hmac_sha256_functions,
cipher_capable_aes_cbc_hmac_sha256),
#ifndef OPENSSL_NO_DES
ALG("DES-EDE3-ECB:DES-EDE3", tdes_ede3_ecb_functions),
ALG("DES-EDE3-CBC:DES3", tdes_ede3_cbc_functions),
ALG("DES-EDE3-ECB:DES-EDE3", ossl_tdes_ede3_ecb_functions),
ALG("DES-EDE3-CBC:DES3", ossl_tdes_ede3_cbc_functions),
#endif /* OPENSSL_NO_DES */
{ { NULL, NULL, NULL }, NULL }
};
@ -398,98 +402,107 @@ static OSSL_ALGORITHM exported_fips_ciphers[OSSL_NELEM(fips_ciphers)];
static const OSSL_ALGORITHM fips_macs[] = {
#ifndef OPENSSL_NO_CMAC
{ "CMAC", FIPS_DEFAULT_PROPERTIES, cmac_functions },
{ "CMAC", FIPS_DEFAULT_PROPERTIES, ossl_cmac_functions },
#endif
{ "GMAC", FIPS_DEFAULT_PROPERTIES, gmac_functions },
{ "HMAC", FIPS_DEFAULT_PROPERTIES, hmac_functions },
{ "KMAC-128:KMAC128", FIPS_DEFAULT_PROPERTIES, kmac128_functions },
{ "KMAC-256:KMAC256", FIPS_DEFAULT_PROPERTIES, kmac256_functions },
{ "GMAC", FIPS_DEFAULT_PROPERTIES, ossl_gmac_functions },
{ "HMAC", FIPS_DEFAULT_PROPERTIES, ossl_hmac_functions },
{ "KMAC-128:KMAC128", FIPS_DEFAULT_PROPERTIES, ossl_kmac128_functions },
{ "KMAC-256:KMAC256", FIPS_DEFAULT_PROPERTIES, ossl_kmac256_functions },
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM fips_kdfs[] = {
{ "HKDF", FIPS_DEFAULT_PROPERTIES, kdf_hkdf_functions },
{ "SSKDF", FIPS_DEFAULT_PROPERTIES, kdf_sskdf_functions },
{ "PBKDF2", FIPS_DEFAULT_PROPERTIES, kdf_pbkdf2_functions },
{ "SSHKDF", FIPS_DEFAULT_PROPERTIES, kdf_sshkdf_functions },
{ "X963KDF", FIPS_DEFAULT_PROPERTIES, kdf_x963_kdf_functions },
{ "TLS1-PRF", FIPS_DEFAULT_PROPERTIES, kdf_tls1_prf_functions },
{ "KBKDF", FIPS_DEFAULT_PROPERTIES, kdf_kbkdf_functions },
{ "HKDF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_hkdf_functions },
{ "SSKDF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_sskdf_functions },
{ "PBKDF2", FIPS_DEFAULT_PROPERTIES, ossl_kdf_pbkdf2_functions },
{ "SSHKDF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_sshkdf_functions },
{ "X963KDF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_x963_kdf_functions },
{ "TLS1-PRF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_tls1_prf_functions },
{ "KBKDF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_kbkdf_functions },
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM fips_rands[] = {
{ "CTR-DRBG", FIPS_DEFAULT_PROPERTIES, drbg_ctr_functions },
{ "HASH-DRBG", FIPS_DEFAULT_PROPERTIES, drbg_hash_functions },
{ "HMAC-DRBG", FIPS_DEFAULT_PROPERTIES, drbg_hmac_functions },
{ "TEST-RAND", FIPS_UNAPPROVED_PROPERTIES, test_rng_functions },
{ "CTR-DRBG", FIPS_DEFAULT_PROPERTIES, ossl_drbg_ctr_functions },
{ "HASH-DRBG", FIPS_DEFAULT_PROPERTIES, ossl_drbg_hash_functions },
{ "HMAC-DRBG", FIPS_DEFAULT_PROPERTIES, ossl_drbg_ossl_hmac_functions },
{ "TEST-RAND", FIPS_UNAPPROVED_PROPERTIES, ossl_test_rng_functions },
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM fips_keyexch[] = {
#ifndef OPENSSL_NO_DH
{ "DH:dhKeyAgreement", FIPS_DEFAULT_PROPERTIES, dh_keyexch_functions },
{ "DH:dhKeyAgreement", FIPS_DEFAULT_PROPERTIES, ossl_dh_keyexch_functions },
#endif
#ifndef OPENSSL_NO_EC
{ "ECDH", FIPS_DEFAULT_PROPERTIES, ecdh_keyexch_functions },
{ "X25519", FIPS_DEFAULT_PROPERTIES, x25519_keyexch_functions },
{ "X448", FIPS_DEFAULT_PROPERTIES, x448_keyexch_functions },
{ "ECDH", FIPS_DEFAULT_PROPERTIES, ecossl_dh_keyexch_functions },
{ "X25519", FIPS_DEFAULT_PROPERTIES, ossl_x25519_keyexch_functions },
{ "X448", FIPS_DEFAULT_PROPERTIES, ossl_x448_keyexch_functions },
#endif
{ "TLS1-PRF", FIPS_DEFAULT_PROPERTIES, kdf_tls1_prf_keyexch_functions },
{ "HKDF", FIPS_DEFAULT_PROPERTIES, kdf_hkdf_keyexch_functions },
{ "TLS1-PRF", FIPS_DEFAULT_PROPERTIES,
ossl_kdf_tls1_prf_keyexch_functions },
{ "HKDF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_hkdf_keyexch_functions },
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM fips_signature[] = {
#ifndef OPENSSL_NO_DSA
{ "DSA:dsaEncryption", FIPS_DEFAULT_PROPERTIES, dsa_signature_functions },
{ "DSA:dsaEncryption", FIPS_DEFAULT_PROPERTIES,
ossl_dsa_signature_functions },
#endif
{ "RSA:rsaEncryption", FIPS_DEFAULT_PROPERTIES, rsa_signature_functions },
{ "RSA:rsaEncryption", FIPS_DEFAULT_PROPERTIES,
ossl_rsa_signature_functions },
#ifndef OPENSSL_NO_EC
{ "ED25519", FIPS_DEFAULT_PROPERTIES, ed25519_signature_functions },
{ "ED448", FIPS_DEFAULT_PROPERTIES, ed448_signature_functions },
{ "ECDSA", FIPS_DEFAULT_PROPERTIES, ecdsa_signature_functions },
{ "ED25519", FIPS_DEFAULT_PROPERTIES, ossl_ed25519_signature_functions },
{ "ED448", FIPS_DEFAULT_PROPERTIES, ossl_ed448_signature_functions },
{ "ECDSA", FIPS_DEFAULT_PROPERTIES, ecossl_dsa_signature_functions },
#endif
{ "HMAC", FIPS_DEFAULT_PROPERTIES, mac_legacy_hmac_signature_functions },
{ "HMAC", FIPS_DEFAULT_PROPERTIES,
ossl_mac_legacy_hmac_signature_functions },
#ifndef OPENSSL_NO_CMAC
{ "CMAC", FIPS_DEFAULT_PROPERTIES, mac_legacy_cmac_signature_functions },
{ "CMAC", FIPS_DEFAULT_PROPERTIES,
ossl_mac_legacy_cmac_signature_functions },
#endif
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM fips_asym_cipher[] = {
{ "RSA:rsaEncryption", FIPS_DEFAULT_PROPERTIES, rsa_asym_cipher_functions },
{ "RSA:rsaEncryption", FIPS_DEFAULT_PROPERTIES,
ossl_rsa_asym_cipher_functions },
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM fips_asym_kem[] = {
{ "RSA", FIPS_DEFAULT_PROPERTIES, rsa_asym_kem_functions },
{ "RSA", FIPS_DEFAULT_PROPERTIES, ossl_rsa_asym_kem_functions },
{ NULL, NULL, NULL }
};
static const OSSL_ALGORITHM fips_keymgmt[] = {
#ifndef OPENSSL_NO_DH
{ "DH:dhKeyAgreement", FIPS_DEFAULT_PROPERTIES, dh_keymgmt_functions },
{ "DHX:X9.42 DH:dhpublicnumber", FIPS_DEFAULT_PROPERTIES, dhx_keymgmt_functions },
{ "DH:dhKeyAgreement", FIPS_DEFAULT_PROPERTIES, ossl_dh_keymgmt_functions },
{ "DHX:X9.42 DH:dhpublicnumber", FIPS_DEFAULT_PROPERTIES,
ossl_dhx_keymgmt_functions },
#endif
#ifndef OPENSSL_NO_DSA
{ "DSA", FIPS_DEFAULT_PROPERTIES, dsa_keymgmt_functions },
{ "DSA", FIPS_DEFAULT_PROPERTIES, ossl_dsa_keymgmt_functions },
#endif
{ "RSA:rsaEncryption", FIPS_DEFAULT_PROPERTIES, rsa_keymgmt_functions },
{ "RSA:rsaEncryption", FIPS_DEFAULT_PROPERTIES,
ossl_rsa_keymgmt_functions },
{ "RSA-PSS:RSASSA-PSS", FIPS_DEFAULT_PROPERTIES,
rsapss_keymgmt_functions },
ossl_rsapss_keymgmt_functions },
#ifndef OPENSSL_NO_EC
{ "EC:id-ecPublicKey", FIPS_DEFAULT_PROPERTIES, ec_keymgmt_functions },
{ "X25519", FIPS_DEFAULT_PROPERTIES, x25519_keymgmt_functions },
{ "X448", FIPS_DEFAULT_PROPERTIES, x448_keymgmt_functions },
{ "ED25519", FIPS_DEFAULT_PROPERTIES, ed25519_keymgmt_functions },
{ "ED448", FIPS_DEFAULT_PROPERTIES, ed448_keymgmt_functions },
{ "EC:id-ecPublicKey", FIPS_DEFAULT_PROPERTIES, ossl_ec_keymgmt_functions },
{ "X25519", FIPS_DEFAULT_PROPERTIES, ossl_x25519_keymgmt_functions },
{ "X448", FIPS_DEFAULT_PROPERTIES, ossl_x448_keymgmt_functions },
{ "ED25519", FIPS_DEFAULT_PROPERTIES, ossl_ed25519_keymgmt_functions },
{ "ED448", FIPS_DEFAULT_PROPERTIES, ossl_ed448_keymgmt_functions },
#endif
{ "TLS1-PRF", FIPS_DEFAULT_PROPERTIES, kdf_keymgmt_functions },
{ "HKDF", FIPS_DEFAULT_PROPERTIES, kdf_keymgmt_functions },
{ "HMAC", FIPS_DEFAULT_PROPERTIES, mac_legacy_keymgmt_functions },
{ "TLS1-PRF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_keymgmt_functions },
{ "HKDF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_keymgmt_functions },
{ "HMAC", FIPS_DEFAULT_PROPERTIES, ossl_mac_legacy_keymgmt_functions },
#ifndef OPENSSL_NO_CMAC
{ "CMAC", FIPS_DEFAULT_PROPERTIES, cmac_legacy_keymgmt_functions },
{ "CMAC", FIPS_DEFAULT_PROPERTIES,
ossl_cossl_mac_legacy_keymgmt_functions },
#endif
{ NULL, NULL, NULL }
};


+ 1
- 1
providers/implementations/asymciphers/rsa_enc.c View File

@ -563,7 +563,7 @@ static const OSSL_PARAM *rsa_settable_ctx_params(ossl_unused void *provctx)
return known_settable_ctx_params;
}
const OSSL_DISPATCH rsa_asym_cipher_functions[] = {
const OSSL_DISPATCH ossl_rsa_asym_cipher_functions[] = {
{ OSSL_FUNC_ASYM_CIPHER_NEWCTX, (void (*)(void))rsa_newctx },
{ OSSL_FUNC_ASYM_CIPHER_ENCRYPT_INIT, (void (*)(void))rsa_encrypt_init },
{ OSSL_FUNC_ASYM_CIPHER_ENCRYPT, (void (*)(void))rsa_encrypt },


+ 21
- 21
providers/implementations/ciphers/cipher_aes.c View File

@ -49,47 +49,47 @@ static void *aes_dupctx(void *ctx)
return ret;
}
/* aes256ecb_functions */
/* ossl_aes256ecb_functions */
IMPLEMENT_generic_cipher(aes, AES, ecb, ECB, 0, 256, 128, 0, block)
/* aes192ecb_functions */
/* ossl_aes192ecb_functions */
IMPLEMENT_generic_cipher(aes, AES, ecb, ECB, 0, 192, 128, 0, block)
/* aes128ecb_functions */
/* ossl_aes128ecb_functions */
IMPLEMENT_generic_cipher(aes, AES, ecb, ECB, 0, 128, 128, 0, block)
/* aes256cbc_functions */
/* ossl_aes256cbc_functions */
IMPLEMENT_generic_cipher(aes, AES, cbc, CBC, 0, 256, 128, 128, block)
/* aes192cbc_functions */
/* ossl_aes192cbc_functions */
IMPLEMENT_generic_cipher(aes, AES, cbc, CBC, 0, 192, 128, 128, block)
/* aes128cbc_functions */
/* ossl_aes128cbc_functions */
IMPLEMENT_generic_cipher(aes, AES, cbc, CBC, 0, 128, 128, 128, block)
/* aes256ofb_functions */
/* ossl_aes256ofb_functions */
IMPLEMENT_generic_cipher(aes, AES, ofb, OFB, 0, 256, 8, 128, stream)
/* aes192ofb_functions */
/* ossl_aes192ofb_functions */
IMPLEMENT_generic_cipher(aes, AES, ofb, OFB, 0, 192, 8, 128, stream)
/* aes128ofb_functions */
/* ossl_aes128ofb_functions */
IMPLEMENT_generic_cipher(aes, AES, ofb, OFB, 0, 128, 8, 128, stream)
/* aes256cfb_functions */
/* ossl_aes256cfb_functions */
IMPLEMENT_generic_cipher(aes, AES, cfb, CFB, 0, 256, 8, 128, stream)
/* aes192cfb_functions */
/* ossl_aes192cfb_functions */
IMPLEMENT_generic_cipher(aes, AES, cfb, CFB, 0, 192, 8, 128, stream)
/* aes128cfb_functions */
/* ossl_aes128cfb_functions */
IMPLEMENT_generic_cipher(aes, AES, cfb, CFB, 0, 128, 8, 128, stream)
/* aes256cfb1_functions */
/* ossl_aes256cfb1_functions */
IMPLEMENT_generic_cipher(aes, AES, cfb1, CFB, 0, 256, 8, 128, stream)
/* aes192cfb1_functions */
/* ossl_aes192cfb1_functions */
IMPLEMENT_generic_cipher(aes, AES, cfb1, CFB, 0, 192, 8, 128, stream)
/* aes128cfb1_functions */
/* ossl_aes128cfb1_functions */
IMPLEMENT_generic_cipher(aes, AES, cfb1, CFB, 0, 128, 8, 128, stream)
/* aes256cfb8_functions */
/* ossl_aes256cfb8_functions */
IMPLEMENT_generic_cipher(aes, AES, cfb8, CFB, 0, 256, 8, 128, stream)
/* aes192cfb8_functions */
/* ossl_aes192cfb8_functions */
IMPLEMENT_generic_cipher(aes, AES, cfb8, CFB, 0, 192, 8, 128, stream)
/* aes128cfb8_functions */
/* ossl_aes128cfb8_functions */
IMPLEMENT_generic_cipher(aes, AES, cfb8, CFB, 0, 128, 8, 128, stream)
/* aes256ctr_functions */
/* ossl_aes256ctr_functions */
IMPLEMENT_generic_cipher(aes, AES, ctr, CTR, 0, 256, 8, 128, stream)
/* aes192ctr_functions */
/* ossl_aes192ctr_functions */
IMPLEMENT_generic_cipher(aes, AES, ctr, CTR, 0, 192, 8, 128, stream)
/* aes128ctr_functions */
/* ossl_aes128ctr_functions */
IMPLEMENT_generic_cipher(aes, AES, ctr, CTR, 0, 128, 8, 128, stream)
#include "cipher_aes_cts.inc"

+ 6
- 6
providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c View File

@ -24,7 +24,7 @@
#ifndef AES_CBC_HMAC_SHA_CAPABLE
# define IMPLEMENT_CIPHER(nm, sub, kbits, blkbits, ivbits, flags) \
const OSSL_DISPATCH nm##kbits##sub##_functions[] = { \
const OSSL_DISPATCH ossl_##nm##kbits##sub##_functions[] = { \
{ 0, NULL } \
};
#else
@ -362,7 +362,7 @@ static int nm##_##kbits##_##sub##_get_params(OSSL_PARAM params[]) \
return cipher_generic_get_params(params, EVP_CIPH_CBC_MODE, \
flags, kbits, blkbits, ivbits); \
} \
const OSSL_DISPATCH nm##kbits##sub##_functions[] = { \
const OSSL_DISPATCH ossl_##nm##kbits##sub##_functions[] = { \
{ OSSL_FUNC_CIPHER_NEWCTX, (void (*)(void))nm##_##kbits##_##sub##_newctx },\
{ OSSL_FUNC_CIPHER_FREECTX, (void (*)(void))nm##_##sub##_freectx }, \
{ OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))nm##_einit }, \
@ -387,11 +387,11 @@ const OSSL_DISPATCH nm##kbits##sub##_functions[] = { \
#endif /* AES_CBC_HMAC_SHA_CAPABLE */
/* aes128cbc_hmac_sha1_functions */
/* ossl_aes128cbc_hmac_sha1_functions */
IMPLEMENT_CIPHER(aes, cbc_hmac_sha1, 128, 128, 128, AES_CBC_HMAC_SHA_FLAGS)
/* aes256cbc_hmac_sha1_functions */
/* ossl_aes256cbc_hmac_sha1_functions */
IMPLEMENT_CIPHER(aes, cbc_hmac_sha1, 256, 128, 128, AES_CBC_HMAC_SHA_FLAGS)
/* aes128cbc_hmac_sha256_functions */
/* ossl_aes128cbc_hmac_sha256_functions */
IMPLEMENT_CIPHER(aes, cbc_hmac_sha256, 128, 128, 128, AES_CBC_HMAC_SHA_FLAGS)
/* aes256cbc_hmac_sha256_functions */
/* ossl_aes256cbc_hmac_sha256_functions */
IMPLEMENT_CIPHER(aes, cbc_hmac_sha256, 256, 128, 128, AES_CBC_HMAC_SHA_FLAGS)

+ 3
- 3
providers/implementations/ciphers/cipher_aes_ccm.c View File

@ -41,9 +41,9 @@ static void aes_ccm_freectx(void *vctx)
OPENSSL_clear_free(ctx, sizeof(*ctx));
}
/* aes128ccm_functions */
/* ossl_aes128ccm_functions */
IMPLEMENT_aead_cipher(aes, ccm, CCM, AEAD_FLAGS, 128, 8, 96);
/* aes192ccm_functions */
/* ossl_aes192ccm_functions */
IMPLEMENT_aead_cipher(aes, ccm, CCM, AEAD_FLAGS, 192, 8, 96);
/* aes256ccm_functions */
/* ossl_aes256ccm_functions */
IMPLEMENT_aead_cipher(aes, ccm, CCM, AEAD_FLAGS, 256, 8, 96);

+ 4
- 4
providers/implementations/ciphers/cipher_aes_cts.inc View File

@ -73,7 +73,7 @@ static int alg##_cts_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, flags, \
kbits, blkbits, ivbits); \
} \
const OSSL_DISPATCH alg##kbits##lcmode##_cts_functions[] = { \
const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_cts_functions[] = { \
{ OSSL_FUNC_CIPHER_NEWCTX, \
(void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \
{ OSSL_FUNC_CIPHER_FREECTX, (void (*)(void)) alg##_freectx }, \
@ -100,9 +100,9 @@ const OSSL_DISPATCH alg##kbits##lcmode##_cts_functions[] = { \
{ 0, NULL } \
};
/* aes256cbc_cts_functions */
/* ossl_aes256cbc_cts_functions */
IMPLEMENT_cts_cipher(aes, AES, cbc, CBC, EVP_CIPH_FLAG_CTS, 256, 128, 128, block)
/* aes192cbc_cts_functions */
/* ossl_aes192cbc_cts_functions */
IMPLEMENT_cts_cipher(aes, AES, cbc, CBC, EVP_CIPH_FLAG_CTS, 192, 128, 128, block)
/* aes128cbc_cts_functions */
/* ossl_aes128cbc_cts_functions */
IMPLEMENT_cts_cipher(aes, AES, cbc, CBC, EVP_CIPH_FLAG_CTS, 128, 128, 128, block)

+ 3
- 3
providers/implementations/ciphers/cipher_aes_gcm.c View File

@ -45,9 +45,9 @@ static void aes_gcm_freectx(void *vctx)
OPENSSL_clear_free(ctx, sizeof(*ctx));
}
/* aes128gcm_functions */
/* ossl_aes128gcm_functions */
IMPLEMENT_aead_cipher(aes, gcm, GCM, AEAD_FLAGS, 128, 8, 96);
/* aes192gcm_functions */
/* ossl_aes192gcm_functions */
IMPLEMENT_aead_cipher(aes, gcm, GCM, AEAD_FLAGS, 192, 8, 96);
/* aes256gcm_functions */
/* ossl_aes256gcm_functions */
IMPLEMENT_aead_cipher(aes, gcm, GCM, AEAD_FLAGS, 256, 8, 96);

+ 1
- 1
providers/implementations/ciphers/cipher_aes_ocb.c View File

@ -518,7 +518,7 @@ static void *aes_##kbits##_##mode##_newctx(void *provctx) \
return aes_##mode##_newctx(provctx, kbits, blkbits, ivbits, \
EVP_CIPH_##UCMODE##_MODE, flags); \
} \
const OSSL_DISPATCH aes##kbits##mode##_functions[] = { \
const OSSL_DISPATCH ossl_##aes##kbits##mode##_functions[] = { \
{ OSSL_FUNC_CIPHER_NEWCTX, \
(void (*)(void))aes_##kbits##_##mode##_newctx }, \
{ OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))aes_##mode##_einit }, \


+ 1
- 1
providers/implementations/ciphers/cipher_aes_siv.c View File

@ -266,7 +266,7 @@ static void * alg##kbits##lc##_newctx(void *provctx) \
return alg##_##lc##_newctx(provctx, 2*kbits, EVP_CIPH_##UCMODE##_MODE, \
flags); \
} \
const OSSL_DISPATCH alg##kbits##lc##_functions[] = { \
const OSSL_DISPATCH ossl_##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_DUPCTX, (void (*)(void)) lc##_dupctx }, \


+ 1
- 1
providers/implementations/ciphers/cipher_aes_wrp.c View File

@ -237,7 +237,7 @@ static int aes_wrap_set_ctx_params(void *vctx, const OSSL_PARAM params[])
return aes_##mode##_newctx(kbits, blkbits, ivbits, \
EVP_CIPH_##UCMODE##_MODE, flags); \
} \
const OSSL_DISPATCH aes##kbits##fname##_functions[] = { \
const OSSL_DISPATCH ossl_##aes##kbits##fname##_functions[] = { \
{ OSSL_FUNC_CIPHER_NEWCTX, \
(void (*)(void))aes_##kbits##fname##_newctx }, \
{ OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))aes_##mode##_einit }, \


+ 2
- 1
providers/implementations/ciphers/cipher_aes_xts.c View File

@ -1,3 +1,4 @@
/*
* Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
*
@ -265,7 +266,7 @@ static void *aes_##kbits##_xts_newctx(void *provctx) \
return aes_xts_newctx(provctx, EVP_CIPH_##UCMODE##_MODE, flags, 2 * kbits, \
AES_XTS_BLOCK_BITS, AES_XTS_IV_BITS); \
} \
const OSSL_DISPATCH aes##kbits##xts_functions[] = { \
const OSSL_DISPATCH ossl_aes##kbits##xts_functions[] = { \
{ OSSL_FUNC_CIPHER_NEWCTX, (void (*)(void))aes_##kbits##_xts_newctx }, \
{ OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))aes_xts_einit }, \
{ OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void))aes_xts_dinit }, \


+ 21
- 21
providers/implementations/ciphers/cipher_aria.c View File

@ -42,45 +42,45 @@ static void *aria_dupctx(void *ctx)
return ret;
}
/* aria256ecb_functions */
/* ossl_aria256ecb_functions */
IMPLEMENT_generic_cipher(aria, ARIA, ecb, ECB, 0, 256, 128, 0, block)
/* aria192ecb_functions */
/* ossl_aria192ecb_functions */
IMPLEMENT_generic_cipher(aria, ARIA, ecb, ECB, 0, 192, 128, 0, block)
/* aria128ecb_functions */
/* ossl_aria128ecb_functions */
IMPLEMENT_generic_cipher(aria, ARIA, ecb, ECB, 0, 128, 128, 0, block)
/* aria256cbc_functions */
/* ossl_aria256cbc_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cbc, CBC, 0, 256, 128, 128, block)
/* aria192cbc_functions */
/* ossl_aria192cbc_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cbc, CBC, 0, 192, 128, 128, block)
/* aria128cbc_functions */
/* ossl_aria128cbc_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cbc, CBC, 0, 128, 128, 128, block)
/* aria256ofb_functions */
/* ossl_aria256ofb_functions */
IMPLEMENT_generic_cipher(aria, ARIA, ofb, OFB, 0, 256, 8, 128, stream)
/* aria192ofb_functions */
/* ossl_aria192ofb_functions */
IMPLEMENT_generic_cipher(aria, ARIA, ofb, OFB, 0, 192, 8, 128, stream)
/* aria128ofb_functions */
/* ossl_aria128ofb_functions */
IMPLEMENT_generic_cipher(aria, ARIA, ofb, OFB, 0, 128, 8, 128, stream)
/* aria256cfb_functions */
/* ossl_aria256cfb_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cfb, CFB, 0, 256, 8, 128, stream)
/* aria192cfb_functions */
/* ossl_aria192cfb_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cfb, CFB, 0, 192, 8, 128, stream)
/* aria128cfb_functions */
/* ossl_aria128cfb_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cfb, CFB, 0, 128, 8, 128, stream)
/* aria256cfb1_functions */
/* ossl_aria256cfb1_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cfb1, CFB, 0, 256, 8, 128, stream)
/* aria192cfb1_functions */
/* ossl_aria192cfb1_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cfb1, CFB, 0, 192, 8, 128, stream)
/* aria128cfb1_functions */
/* ossl_aria128cfb1_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cfb1, CFB, 0, 128, 8, 128, stream)
/* aria256cfb8_functions */
/* ossl_aria256cfb8_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cfb8, CFB, 0, 256, 8, 128, stream)
/* aria192cfb8_functions */
/* ossl_aria192cfb8_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cfb8, CFB, 0, 192, 8, 128, stream)
/* aria128cfb8_functions */
/* ossl_aria128cfb8_functions */
IMPLEMENT_generic_cipher(aria, ARIA, cfb8, CFB, 0, 128, 8, 128, stream)
/* aria256ctr_functions */
/* ossl_aria256ctr_functions */
IMPLEMENT_generic_cipher(aria, ARIA, ctr, CTR, 0, 256, 8, 128, stream)
/* aria192ctr_functions */
/* ossl_aria192ctr_functions */
IMPLEMENT_generic_cipher(aria, ARIA, ctr, CTR, 0, 192, 8, 128, stream)
/* aria128ctr_functions */
/* ossl_aria128ctr_functions */
IMPLEMENT_generic_cipher(aria, ARIA, ctr, CTR, 0, 128, 8, 128, stream)

+ 3
- 3
providers/implementations/ciphers/cipher_aria_gcm.c View File

@ -37,10 +37,10 @@ static void aria_gcm_freectx(void *vctx)
OPENSSL_clear_free(ctx, sizeof(*ctx));
}
/* aria128gcm_functions */
/* ossl_aria128gcm_functions */
IMPLEMENT_aead_cipher(aria, gcm, GCM, AEAD_FLAGS, 128, 8, 96);
/* aria192gcm_functions */
/* ossl_aria192gcm_functions */
IMPLEMENT_aead_cipher(aria, gcm, GCM, AEAD_FLAGS, 192, 8, 96);
/* aria256gcm_functions */
/* ossl_aria256gcm_functions */
IMPLEMENT_aead_cipher(aria, gcm, GCM, AEAD_FLAGS, 256, 8, 96);

+ 21
- 21
providers/implementations/ciphers/cipher_camellia.c View File

@ -48,46 +48,46 @@ static void *camellia_dupctx(void *ctx)
return ret;
}
/* camellia256ecb_functions */
/* ossl_camellia256ecb_functions */
IMPLEMENT_generic_cipher(camellia, CAMELLIA,