| /openbmc/qemu/tests/unit/ |
| H A D | test-crypto-cipher.c | 30 QCryptoCipherAlgo alg; member 46 .alg = QCRYPTO_CIPHER_ALGO_AES_128, 63 .alg = QCRYPTO_CIPHER_ALGO_AES_192, 80 .alg = QCRYPTO_CIPHER_ALGO_AES_256, 99 .alg = QCRYPTO_CIPHER_ALGO_AES_128, 117 .alg = QCRYPTO_CIPHER_ALGO_AES_192, 135 .alg = QCRYPTO_CIPHER_ALGO_AES_256, 159 .alg = QCRYPTO_CIPHER_ALGO_DES, 168 .alg = QCRYPTO_CIPHER_ALGO_DES, 177 .alg = QCRYPTO_CIPHER_ALGO_DES, [all …]
|
| H A D | test-crypto-hmac.c | 30 QCryptoHashAlgo alg; member 36 .alg = QCRYPTO_HASH_ALGO_MD5, 41 .alg = QCRYPTO_HASH_ALGO_SHA1, 47 .alg = QCRYPTO_HASH_ALGO_SHA224, 53 .alg = QCRYPTO_HASH_ALGO_SHA256, 59 .alg = QCRYPTO_HASH_ALGO_SHA384, 66 .alg = QCRYPTO_HASH_ALGO_SHA512, 74 .alg = QCRYPTO_HASH_ALGO_RIPEMD160, 81 .alg = QCRYPTO_HASH_ALGO_SM3, 104 if (!qcrypto_hmac_supports(data->alg)) { in test_hmac_alloc() [all …]
|
| H A D | test-crypto-akcipher.c | 788 .alg = QCRYPTO_AK_CIPHER_ALGO_RSA, 808 .alg = QCRYPTO_AK_CIPHER_ALGO_RSA, 833 .alg = QCRYPTO_AK_CIPHER_ALGO_RSA, 853 .alg = QCRYPTO_AK_CIPHER_ALGO_RSA, 947 .alg = QCRYPTO_AK_CIPHER_ALGO_RSA, in test_rsakey()
|
| /openbmc/qemu/crypto/ |
| H A D | hash-afalg.c | 24 qcrypto_afalg_hash_format_name(QCryptoHashAlgo alg, in qcrypto_afalg_hash_format_name() argument 31 switch (alg) { in qcrypto_afalg_hash_format_name() 55 error_setg(errp, "Unsupported hash algorithm %d", alg); in qcrypto_afalg_hash_format_name() 69 qcrypto_afalg_hash_hmac_ctx_new(QCryptoHashAlgo alg, in qcrypto_afalg_hash_hmac_ctx_new() argument 76 name = qcrypto_afalg_hash_format_name(alg, is_hmac, errp); in qcrypto_afalg_hash_hmac_ctx_new() 103 qcrypto_afalg_hash_ctx_new(QCryptoHashAlgo alg, in qcrypto_afalg_hash_ctx_new() argument 106 return qcrypto_afalg_hash_hmac_ctx_new(alg, NULL, 0, false, errp); in qcrypto_afalg_hash_ctx_new() 110 qcrypto_afalg_hmac_ctx_new(QCryptoHashAlgo alg, in qcrypto_afalg_hmac_ctx_new() argument 114 return qcrypto_afalg_hash_hmac_ctx_new(alg, key, nkey, true, errp); in qcrypto_afalg_hmac_ctx_new() 118 QCryptoHash *qcrypto_afalg_hash_new(QCryptoHashAlgo alg, Error **errp) in qcrypto_afalg_hash_new() argument [all …]
|
| H A D | hash-gcrypt.c | 42 gboolean qcrypto_hash_supports(QCryptoHashAlgo alg) in qcrypto_hash_supports() argument 44 if (alg < G_N_ELEMENTS(qcrypto_hash_alg_map) && in qcrypto_hash_supports() 45 qcrypto_hash_alg_map[alg] != GCRY_MD_NONE) { in qcrypto_hash_supports() 46 return gcry_md_test_algo(qcrypto_hash_alg_map[alg]) == 0; in qcrypto_hash_supports() 52 QCryptoHash *qcrypto_gcrypt_hash_new(QCryptoHashAlgo alg, Error **errp) in qcrypto_gcrypt_hash_new() argument 58 hash->alg = alg; in qcrypto_gcrypt_hash_new() 62 qcrypto_hash_alg_map[alg], 0); in qcrypto_gcrypt_hash_new() 113 ret = gcry_md_get_algo_dlen(qcrypto_hash_alg_map[hash->alg]); in qcrypto_gcrypt_hash_finalize()
|
| H A D | hash-glib.c | 38 gboolean qcrypto_hash_supports(QCryptoHashAlgo alg) in qcrypto_hash_supports() argument 40 if (alg < G_N_ELEMENTS(qcrypto_hash_alg_map) && in qcrypto_hash_supports() 41 qcrypto_hash_alg_map[alg] != -1) { in qcrypto_hash_supports() 48 QCryptoHash *qcrypto_glib_hash_new(QCryptoHashAlgo alg, in qcrypto_glib_hash_new() argument 54 hash->alg = alg; in qcrypto_glib_hash_new() 55 hash->opaque = g_checksum_new(qcrypto_hash_alg_map[alg]); in qcrypto_glib_hash_new() 95 ret = g_checksum_type_get_length(qcrypto_hash_alg_map[hash->alg]); in qcrypto_glib_hash_finalize()
|
| H A D | hash-gnutls.c | 39 gboolean qcrypto_hash_supports(QCryptoHashAlgo alg) in qcrypto_hash_supports() argument 43 if (alg >= G_N_ELEMENTS(qcrypto_hash_alg_map) || in qcrypto_hash_supports() 44 qcrypto_hash_alg_map[alg] == GNUTLS_DIG_UNKNOWN) { in qcrypto_hash_supports() 49 if (algs[i] == qcrypto_hash_alg_map[alg]) { in qcrypto_hash_supports() 57 QCryptoHash *qcrypto_gnutls_hash_new(QCryptoHashAlgo alg, Error **errp) in qcrypto_gnutls_hash_new() argument 63 hash->alg = alg; in qcrypto_gnutls_hash_new() 66 ret = gnutls_hash_init(hash->opaque, qcrypto_hash_alg_map[alg]); in qcrypto_gnutls_hash_new() 120 ret = gnutls_hash_get_len(qcrypto_hash_alg_map[hash->alg]); in qcrypto_gnutls_hash_finalize()
|
| H A D | hash-nettle.c | 112 gboolean qcrypto_hash_supports(QCryptoHashAlgo alg) in qcrypto_hash_supports() argument 114 if (alg < G_N_ELEMENTS(qcrypto_hash_alg_map) && in qcrypto_hash_supports() 115 qcrypto_hash_alg_map[alg].init != NULL) { in qcrypto_hash_supports() 122 QCryptoHash *qcrypto_nettle_hash_new(QCryptoHashAlgo alg, Error **errp) in qcrypto_nettle_hash_new() argument 127 hash->alg = alg; in qcrypto_nettle_hash_new() 130 qcrypto_hash_alg_map[alg].init(hash->opaque); in qcrypto_nettle_hash_new() 152 qcrypto_hash_alg_map[hash->alg].write(ctx, in qcrypto_nettle_hash_update() 167 int ret = qcrypto_hash_alg_map[hash->alg].len; in qcrypto_nettle_hash_finalize() 179 qcrypto_hash_alg_map[hash->alg].result(ctx, *result_len, *result); in qcrypto_nettle_hash_finalize()
|
| H A D | cipher-stub.c.inc | 10 bool qcrypto_cipher_supports(QCryptoCipherAlgo alg, 16 static QCryptoCipher *qcrypto_cipher_ctx_new(QCryptoCipherAlgo alg, 22 if (!qcrypto_cipher_validate_key_length(alg, mode, nkey, errp)) { 28 QCryptoCipherAlgo_str(alg));
|
| H A D | x509-utils.c | 29 QCryptoHashAlgo alg, in qcrypto_get_x509_cert_fingerprint() argument 39 if (alg >= G_N_ELEMENTS(qcrypto_to_gnutls_hash_alg_map)) { in qcrypto_get_x509_cert_fingerprint() 60 hlen = gnutls_hash_get_len(qcrypto_to_gnutls_hash_alg_map[alg]); in qcrypto_get_x509_cert_fingerprint() 69 qcrypto_to_gnutls_hash_alg_map[alg], in qcrypto_get_x509_cert_fingerprint()
|
| H A D | ivgen.c | 30 QCryptoIVGen *qcrypto_ivgen_new(QCryptoIVGenAlgo alg, in qcrypto_ivgen_new() argument 38 ivgen->algorithm = alg; in qcrypto_ivgen_new() 42 switch (alg) { in qcrypto_ivgen_new() 53 error_setg(errp, "Unknown block IV generator algorithm %d", alg); in qcrypto_ivgen_new()
|
| H A D | cipher-afalg.c | 21 qcrypto_afalg_cipher_format_name(QCryptoCipherAlgo alg, in qcrypto_afalg_cipher_format_name() argument 29 switch (alg) { in qcrypto_afalg_cipher_format_name() 50 error_setg(errp, "Unsupported cipher algorithm %d", alg); in qcrypto_afalg_cipher_format_name() 63 qcrypto_afalg_cipher_ctx_new(QCryptoCipherAlgo alg, in qcrypto_afalg_cipher_ctx_new() argument 72 name = qcrypto_afalg_cipher_format_name(alg, mode, errp); in qcrypto_afalg_cipher_ctx_new() 96 expect_niv = qcrypto_cipher_get_iv_len(alg, mode); in qcrypto_afalg_cipher_ctx_new() 126 expect_niv = qcrypto_cipher_get_iv_len(cipher->alg, cipher->mode); in qcrypto_afalg_cipher_setiv()
|
| H A D | cipher-gcrypt.c.inc | 23 static int qcrypto_cipher_alg_to_gcry_alg(QCryptoCipherAlgo alg) 25 switch (alg) { 73 bool qcrypto_cipher_supports(QCryptoCipherAlgo alg, 76 switch (alg) { 96 if (gcry_cipher_algo_info(qcrypto_cipher_alg_to_gcry_alg(alg), 231 static QCryptoCipher *qcrypto_cipher_ctx_new(QCryptoCipherAlgo alg, 242 if (!qcrypto_cipher_validate_key_length(alg, mode, nkey, errp)) { 246 gcryalg = qcrypto_cipher_alg_to_gcry_alg(alg); 249 QCryptoCipherAlgo_str(alg));
|
| H A D | hmacpriv.h | 31 void *qcrypto_hmac_ctx_new(QCryptoHashAlgo alg, 40 QCryptoAFAlgo *qcrypto_afalg_hmac_ctx_new(QCryptoHashAlgo alg,
|
| H A D | akcipher.c | 117 switch (opts->alg) { in qcrypto_akcipher_export_p8info() 123 error_setg(errp, "Unsupported algorithm: %u", opts->alg); in qcrypto_akcipher_export_p8info()
|
| H A D | blockpriv.h | 36 QCryptoCipherAlgo alg; member 135 QCryptoCipherAlgo alg,
|
| H A D | hashpriv.h | 24 QCryptoHash *(*hash_new)(QCryptoHashAlgo alg, Error **errp);
|
| /openbmc/qemu/include/crypto/ |
| H A D | cipher.h | 81 QCryptoCipherAlgo alg; member 96 bool qcrypto_cipher_supports(QCryptoCipherAlgo alg, 109 size_t qcrypto_cipher_get_block_len(QCryptoCipherAlgo alg); 120 size_t qcrypto_cipher_get_key_len(QCryptoCipherAlgo alg); 133 size_t qcrypto_cipher_get_iv_len(QCryptoCipherAlgo alg, 159 QCryptoCipher *qcrypto_cipher_new(QCryptoCipherAlgo alg,
|
| /openbmc/qemu/tests/bench/ |
| H A D | benchmark-crypto-cipher.c | 20 QCryptoCipherAlgo alg) in test_cipher_speed() argument 31 if (!qcrypto_cipher_supports(alg, mode)) { in test_cipher_speed() 35 nkey = qcrypto_cipher_get_key_len(alg); in test_cipher_speed() 36 niv = qcrypto_cipher_get_iv_len(alg, mode); in test_cipher_speed() 52 cipher = qcrypto_cipher_new(alg, mode, in test_cipher_speed() 74 QCryptoCipherAlgo_str(alg), in test_cipher_speed() 91 QCryptoCipherAlgo_str(alg), in test_cipher_speed() 170 char *alg = NULL; in main() local 176 if ((!alg || g_str_equal(alg, #mode)) && \ in main() 184 alg = argv[1]; in main()
|
| H A D | benchmark-crypto-akcipher.c | 28 opt.alg = QCRYPTO_AK_CIPHER_ALGO_RSA; in create_rsa_akcipher() 110 char *alg = NULL; in main() local 116 if ((!alg || g_str_equal(alg, #asym_alg)) && \ in main() 124 alg = argv[1]; in main()
|
| H A D | benchmark-crypto-hash.c | 20 QCryptoHashAlgo alg; member 42 ret = qcrypto_hash_bytesv(opts->alg, in test_hash_speed() 52 QCryptoHashAlgo_str(opts->alg), in test_hash_speed() 68 .alg = QCRYPTO_HASH_ALGO_ ## a, .chunk_size = c, \ in main()
|
| /openbmc/qemu/tests/qemu-iotests/ |
| H A D | 210.out | 20 ivgen alg: plain64 22 hash alg: sha256 23 cipher alg: aes-256 63 …alg": "aes-128", "cipher-mode": "cbc", "driver": "luks", "file": {"driver": "file", "filename": "T… 73 ivgen alg: plain64 75 hash alg: sha1 76 cipher alg: aes-128 129 ivgen alg: plain64 131 hash alg: sha256 132 cipher alg: aes-256 [all …]
|
| H A D | 198.out | 41 ivgen alg: plain64 43 hash alg: sha256 44 cipher alg: aes-256 87 ivgen alg: plain64 89 hash alg: sha256 90 cipher alg: aes-256
|
| H A D | 082.out | 58 encrypt.cipher-alg=<str> - Name of encryption cipher algorithm 61 encrypt.hash-alg=<str> - Name of encryption hash algorithm 63 encrypt.ivgen-alg=<str> - Name of IV generator algorithm 64 encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm 84 encrypt.cipher-alg=<str> - Name of encryption cipher algorithm 87 encrypt.hash-alg=<str> - Name of encryption hash algorithm 89 encrypt.ivgen-alg=<str> - Name of IV generator algorithm 90 encrypt.ivgen-hash-alg=<str> - Name of IV generator hash algorithm 110 encrypt.cipher-alg=<str> - Name of encryption cipher algorithm 113 encrypt.hash-alg=<str> - Name of encryption hash algorithm [all …]
|
| /openbmc/u-boot/drivers/tpm/ |
| H A D | tpm2_tis_sandbox.c | 274 u16 alg; in sandbox_tpm2_xfer() local 504 alg = get_unaligned_be16(sent); in sandbox_tpm2_xfer() 505 sent += sizeof(alg); in sandbox_tpm2_xfer() 506 if (alg != TPM2_ALG_SHA256) { in sandbox_tpm2_xfer() 589 alg = get_unaligned_be16(sent); in sandbox_tpm2_xfer() 590 sent += sizeof(alg); in sandbox_tpm2_xfer() 591 if (alg != TPM2_ALG_SHA256) { in sandbox_tpm2_xfer()
|