| /openbmc/qemu/crypto/ |
| H A D | cipher.c | 156 QCryptoCipher *cipher = NULL; in qcrypto_cipher_new() local 159 cipher = qcrypto_afalg_cipher_ctx_new(alg, mode, key, nkey, NULL); in qcrypto_cipher_new() 162 if (!cipher) { in qcrypto_cipher_new() 163 cipher = qcrypto_cipher_ctx_new(alg, mode, key, nkey, errp); in qcrypto_cipher_new() 164 if (!cipher) { in qcrypto_cipher_new() 169 cipher->alg = alg; in qcrypto_cipher_new() 170 cipher->mode = mode; in qcrypto_cipher_new() 172 return cipher; in qcrypto_cipher_new() 176 int qcrypto_cipher_encrypt(QCryptoCipher *cipher, in qcrypto_cipher_encrypt() argument 182 const QCryptoCipherDriver *drv = cipher->driver; in qcrypto_cipher_encrypt() [all …]
|
| H A D | block.c | 253 QCryptoCipher *cipher) in qcrypto_block_push_cipher() argument 264 block->free_ciphers[block->n_free_ciphers] = cipher; in qcrypto_block_push_cipher() 275 QCryptoCipher *cipher; in qcrypto_block_init_cipher() local 290 cipher = qcrypto_block_pop_cipher(block, errp); in qcrypto_block_init_cipher() 291 if (!cipher) { in qcrypto_block_init_cipher() 297 qcrypto_block_push_cipher(block, cipher); in qcrypto_block_init_cipher() 368 typedef int (*QCryptoCipherEncDecFunc)(QCryptoCipher *cipher, 374 static int do_qcrypto_block_cipher_encdec(QCryptoCipher *cipher, in do_qcrypto_block_cipher_encdec() argument 407 if (qcrypto_cipher_setiv(cipher, in do_qcrypto_block_cipher_encdec() 415 if (func(cipher, buf, buf, nbytes, errp) < 0) { in do_qcrypto_block_cipher_encdec() [all …]
|
| H A D | ivgen-essiv.c | 27 QCryptoCipher *cipher; member 40 nsalt = qcrypto_cipher_get_key_len(ivgen->cipher); in qcrypto_ivgen_essiv_init() 55 essiv->cipher = qcrypto_cipher_new(ivgen->cipher, in qcrypto_ivgen_essiv_init() 59 if (!essiv->cipher) { in qcrypto_ivgen_essiv_init() 77 size_t ndata = qcrypto_cipher_get_block_len(ivgen->cipher); in qcrypto_ivgen_essiv_calculate() 86 if (qcrypto_cipher_encrypt(essiv->cipher, in qcrypto_ivgen_essiv_calculate() 110 qcrypto_cipher_free(essiv->cipher); in qcrypto_ivgen_essiv_cleanup()
|
| H A D | cipherpriv.h | 21 int (*cipher_encrypt)(QCryptoCipher *cipher, 27 int (*cipher_decrypt)(QCryptoCipher *cipher, 33 int (*cipher_setiv)(QCryptoCipher *cipher, 37 void (*cipher_free)(QCryptoCipher *cipher);
|
| H A D | cipher-afalg.c | 118 qcrypto_afalg_cipher_setiv(QCryptoCipher *cipher, in qcrypto_afalg_cipher_setiv() argument 122 QCryptoAFAlgo *afalg = container_of(cipher, QCryptoAFAlgo, base); in qcrypto_afalg_cipher_setiv() 126 expect_niv = qcrypto_cipher_get_iv_len(cipher->alg, cipher->mode); in qcrypto_afalg_cipher_setiv() 201 qcrypto_afalg_cipher_encrypt(QCryptoCipher *cipher, in qcrypto_afalg_cipher_encrypt() argument 205 QCryptoAFAlgo *afalg = container_of(cipher, QCryptoAFAlgo, base); in qcrypto_afalg_cipher_encrypt() 211 qcrypto_afalg_cipher_decrypt(QCryptoCipher *cipher, in qcrypto_afalg_cipher_decrypt() argument 215 QCryptoAFAlgo *afalg = container_of(cipher, QCryptoAFAlgo, base); in qcrypto_afalg_cipher_decrypt() 220 static void qcrypto_afalg_comm_ctx_free(QCryptoCipher *cipher) in qcrypto_afalg_comm_ctx_free() argument 222 QCryptoAFAlgo *afalg = container_of(cipher, QCryptoAFAlgo, base); in qcrypto_afalg_comm_ctx_free()
|
| H A D | cipher-gcrypt.c.inc | 2 * QEMU Crypto cipher libgcrypt algorithms 119 static void qcrypto_gcrypt_ctx_free(QCryptoCipher *cipher) 121 QCryptoCipherGcrypt *ctx = container_of(cipher, QCryptoCipherGcrypt, base); 127 static int qcrypto_gcrypt_encrypt(QCryptoCipher *cipher, const void *in, 130 QCryptoCipherGcrypt *ctx = container_of(cipher, QCryptoCipherGcrypt, base); 149 static int qcrypto_gcrypt_decrypt(QCryptoCipher *cipher, const void *in, 152 QCryptoCipherGcrypt *ctx = container_of(cipher, QCryptoCipherGcrypt, base); 171 static int qcrypto_gcrypt_setiv(QCryptoCipher *cipher, 175 QCryptoCipherGcrypt *ctx = container_of(cipher, QCryptoCipherGcrypt, base); 194 static int qcrypto_gcrypt_ctr_setiv(QCryptoCipher *cipher, [all …]
|
| H A D | tls-cipher-suites.c | 57 IANA_TLS_CIPHER cipher; in qcrypto_tls_cipher_suites_get_data() local 69 name = gnutls_cipher_suite_info(idx, (unsigned char *)&cipher, in qcrypto_tls_cipher_suites_get_data() 76 g_byte_array_append(byte_array, cipher.data, 2); in qcrypto_tls_cipher_suites_get_data() 77 trace_qcrypto_tls_cipher_suite_info(cipher.data[0], in qcrypto_tls_cipher_suites_get_data() 78 cipher.data[1], in qcrypto_tls_cipher_suites_get_data()
|
| H A D | cipher-gnutls.c.inc | 2 * QEMU Crypto cipher gnutls algorithms 74 qcrypto_gnutls_cipher_free(QCryptoCipher *cipher) 76 QCryptoCipherGnutls *ctx = container_of(cipher, QCryptoCipherGnutls, base); 87 qcrypto_gnutls_cipher_encrypt(QCryptoCipher *cipher, 93 QCryptoCipherGnutls *ctx = container_of(cipher, QCryptoCipherGnutls, base); 118 error_setg(errp, "Cannot initialize cipher: %s", 147 qcrypto_gnutls_cipher_decrypt(QCryptoCipher *cipher, 153 QCryptoCipherGnutls *ctx = container_of(cipher, QCryptoCipherGnutls, base); 179 error_setg(errp, "Cannot initialize cipher: %s", 207 qcrypto_gnutls_cipher_setiv(QCryptoCipher *cipher, [all …]
|
| H A D | cipher-nettle.c.inc | 2 * QEMU Crypto cipher nettle algorithms 57 static int qcrypto_cipher_no_setiv(QCryptoCipher *cipher, 67 static int NAME##_setiv(QCryptoCipher *cipher, const uint8_t *iv, \ 70 TYPE *ctx = container_of(cipher, TYPE, base); \ 81 static int NAME##_encrypt_ecb(QCryptoCipher *cipher, const void *in, \ 84 TYPE *ctx = container_of(cipher, TYPE, base); \ 91 static int NAME##_decrypt_ecb(QCryptoCipher *cipher, const void *in, \ 94 TYPE *ctx = container_of(cipher, TYPE, base); \ 110 static int NAME##_encrypt_cbc(QCryptoCipher *cipher, const void *in, \ 113 TYPE *ctx = container_of(cipher, TYPE, base); \ [all …]
|
| /openbmc/phosphor-net-ipmid/test/ |
| H A D | cipher.cpp | 27 auto algoPtr = std::make_unique<cipher::integrity::AlgoSHA1>(sik); in TEST() 35 cipher::integrity::AlgoSHA1::SHA1_96_AUTHCODE_LENGTH)); in TEST() 65 output.resize(cipher::integrity::AlgoSHA1::SHA1_96_AUTHCODE_LENGTH); in TEST() 113 output.resize(cipher::integrity::AlgoSHA1::SHA1_96_AUTHCODE_LENGTH); in TEST() 129 auto algoPtr = std::make_unique<cipher::integrity::AlgoSHA1>(sik); in TEST() 164 auto algoPtr = std::make_unique<cipher::integrity::AlgoSHA1>(sik); in TEST() 189 auto algoPtr = std::make_unique<cipher::integrity::AlgoSHA256>(sik); in TEST() 198 cipher::integrity::AlgoSHA256::SHA256_128_AUTHCODE_LENGTH)); in TEST() 228 output.resize(cipher::integrity::AlgoSHA256::SHA256_128_AUTHCODE_LENGTH); in TEST() 277 output.resize(cipher::integrity::AlgoSHA256::SHA256_128_AUTHCODE_LENGTH); in TEST() [all …]
|
| /openbmc/qemu/tests/unit/ |
| H A D | test-crypto-cipher.c | 653 QCryptoCipher *cipher; in test_cipher() local 676 cipher = qcrypto_cipher_new( in test_cipher() 681 g_assert(cipher != NULL); in test_cipher() 684 g_assert(cipher == NULL); in test_cipher() 703 g_assert(qcrypto_cipher_setiv(cipher, in test_cipher() 707 g_assert(qcrypto_cipher_encrypt(cipher, in test_cipher() 720 g_assert(qcrypto_cipher_setiv(cipher, in test_cipher() 724 g_assert(qcrypto_cipher_decrypt(cipher, in test_cipher() 741 qcrypto_cipher_free(cipher); in test_cipher() 747 QCryptoCipher *cipher; in test_cipher_null_iv() local [all …]
|
| /openbmc/phosphor-net-ipmid/command/ |
| H A D | open_session.cpp | 33 if (!cipher::rakp_auth::Interface::isAlgorithmSupported( in openSession() 34 static_cast<cipher::rakp_auth::Algorithms>(request->authAlgo))) in openSession() 42 if (!cipher::integrity::Interface::isAlgorithmSupported( in openSession() 43 static_cast<cipher::integrity::Algorithms>(request->intAlgo))) in openSession() 67 if (!cipher::crypt::Interface::isAlgorithmSupported( in openSession() 68 static_cast<cipher::crypt::Algorithms>(request->confAlgo))) in openSession() 81 static_cast<cipher::rakp_auth::Algorithms>(request->authAlgo), in openSession() 82 static_cast<cipher::integrity::Algorithms>(request->intAlgo), in openSession() 83 static_cast<cipher::crypt::Algorithms>(request->confAlgo)); in openSession()
|
| H A D | rakp34.cpp | 25 case cipher::integrity::Algorithms::HMAC_SHA1_96: in applyIntegrityAlgo() 28 std::make_unique<cipher::integrity::AlgoSHA1>( in applyIntegrityAlgo() 32 case cipher::integrity::Algorithms::HMAC_SHA256_128: in applyIntegrityAlgo() 35 std::make_unique<cipher::integrity::AlgoSHA256>( in applyIntegrityAlgo() 52 case cipher::crypt::Algorithms::AES_CBC_128: in applyCryptAlgo() 58 std::make_unique<cipher::crypt::AlgoAES128>(k2)); in applyCryptAlgo() 129 input.resize(cipher::rakp_auth::BMC_RANDOM_NUMBER_LEN + in RAKP34() 138 std::advance(iter, cipher::rakp_auth::BMC_RANDOM_NUMBER_LEN); in RAKP34() 188 input.resize(cipher::rakp_auth::REMOTE_CONSOLE_RANDOM_NUMBER_LEN + in RAKP34() 189 cipher::rakp_auth::BMC_RANDOM_NUMBER_LEN + in RAKP34() [all …]
|
| H A D | rakp12.cpp | 116 cipher::rakp_auth::REMOTE_CONSOLE_RANDOM_NUMBER_LEN + in RAKP12() 117 cipher::rakp_auth::BMC_RANDOM_NUMBER_LEN + BMC_GUID_LEN + in RAKP12() 137 cipher::rakp_auth::REMOTE_CONSOLE_RANDOM_NUMBER_LEN, in RAKP12() 141 std::advance(iter, cipher::rakp_auth::REMOTE_CONSOLE_RANDOM_NUMBER_LEN); in RAKP12() 145 cipher::rakp_auth::REMOTE_CONSOLE_RANDOM_NUMBER_LEN, in RAKP12() 146 cipher::rakp_auth::BMC_RANDOM_NUMBER_LEN)) in RAKP12() 291 std::copy_n(iter, cipher::rakp_auth::BMC_RANDOM_NUMBER_LEN, in RAKP12() 293 std::advance(iter, cipher::rakp_auth::BMC_RANDOM_NUMBER_LEN); in RAKP12()
|
| /openbmc/qemu/tests/bench/ |
| H A D | benchmark-crypto-cipher.c | 22 QCryptoCipher *cipher; in test_cipher_speed() local 52 cipher = qcrypto_cipher_new(alg, mode, in test_cipher_speed() 54 g_assert(cipher != NULL); in test_cipher_speed() 57 g_assert(qcrypto_cipher_setiv(cipher, in test_cipher_speed() 64 g_assert(qcrypto_cipher_encrypt(cipher, in test_cipher_speed() 81 g_assert(qcrypto_cipher_decrypt(cipher, in test_cipher_speed() 95 qcrypto_cipher_free(cipher); in test_cipher_speed() 175 #define ADD_TEST(mode, cipher, keysize, chunk) \ in main() argument 179 "/crypto/cipher/" #mode "-" #cipher "-" #keysize "/chunk-" #chunk, \ in main() 181 test_cipher_speed_ ## mode ## _ ## cipher ## _ ## keysize) in main()
|
| /openbmc/qemu/include/crypto/ |
| H A D | cipher.h | 171 void qcrypto_cipher_free(QCryptoCipher *cipher); 190 int qcrypto_cipher_encrypt(QCryptoCipher *cipher, 212 int qcrypto_cipher_decrypt(QCryptoCipher *cipher, 234 int qcrypto_cipher_setiv(QCryptoCipher *cipher,
|
| /openbmc/phosphor-net-ipmid/ |
| H A D | session.hpp | 149 void setAuthAlgo(std::unique_ptr<cipher::rakp_auth::Interface>&& inAuthAlgo) in setAuthAlgo() 178 std::unique_ptr<cipher::integrity::Interface>&& integrityAlgo) in setIntegrityAlgo() 215 void setCryptAlgo(std::unique_ptr<cipher::crypt::Interface>&& cryptAlgo) in setCryptAlgo() 299 std::unique_ptr<cipher::rakp_auth::Interface> authAlgoInterface; 302 std::unique_ptr<cipher::integrity::Interface> integrityAlgoInterface = 306 std::unique_ptr<cipher::crypt::Interface> cryptAlgoInterface = nullptr;
|
| H A D | sessions_manager.cpp | 79 cipher::rakp_auth::Algorithms authAlgo, in startSession() 80 cipher::integrity::Algorithms intAlgo, cipher::crypt::Algorithms cryptAlgo) in startSession() 145 case cipher::rakp_auth::Algorithms::RAKP_HMAC_SHA1: in startSession() 148 std::make_unique<cipher::rakp_auth::AlgoSHA1>(intAlgo, in startSession() 152 case cipher::rakp_auth::Algorithms::RAKP_HMAC_SHA256: in startSession() 155 std::make_unique<cipher::rakp_auth::AlgoSHA256>(intAlgo, in startSession()
|
| /openbmc/pam-ipmi/src/pam_ipmisave/ |
| H A D | pam_ipmisave.c | 146 const EVP_CIPHER *cipher, const unsigned char *key, in encrypt_decrypt_data() argument 158 if (cipher == NULL || key == NULL || iv == NULL || inbytes == NULL || in encrypt_decrypt_data() 160 EVP_CIPHER_key_length(cipher) > keylen || in encrypt_decrypt_data() 161 EVP_CIPHER_iv_length(cipher) > ivlen) { in encrypt_decrypt_data() 191 retval = EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, isencrypt); in encrypt_decrypt_data() 283 const EVP_CIPHER *cipher = EVP_aes_128_cbc(); in update_pass_special_file() local 301 unsigned char iv[EVP_CIPHER_iv_length(cipher)]; in update_pass_special_file() 394 3 + EVP_CIPHER_block_size(cipher); in update_pass_special_file() 415 pamh, 0, cipher, key, keylen, in update_pass_special_file() 473 EVP_CIPHER_block_size(cipher); in update_pass_special_file() [all …]
|
| /openbmc/qemu/tests/qemu-iotests/ |
| H A D | 149 | 37 def __init__(self, name, cipher, keylen, mode, ivgen, argument 41 self.cipher = cipher 157 cipher = config.cipher + "-" + config.mode + "-" + config.ivgen 159 cipher = cipher + ":" + config.ivgen_hash 161 cipher = cipher + ":" + "sha256" 162 args.extend(["--cipher", cipher]) 251 "cipher-alg=%s-%d" % (config.cipher, config.keylen),
|
| H A D | 210.out | 23 cipher alg: aes-256 25 cipher mode: xts 63 …ockdev-create", "arguments": {"job-id": "job0", "options": {"cipher-alg": "aes-128", "cipher-mode"… 76 cipher alg: aes-128 78 cipher mode: cbc 132 cipher alg: aes-256 134 cipher mode: xts 203 cipher alg: aes-256 205 cipher mode: xts
|
| H A D | 082.out | 58 encrypt.cipher-alg=<str> - Name of encryption cipher algorithm 59 encrypt.cipher-mode=<str> - Name of encryption cipher mode 84 encrypt.cipher-alg=<str> - Name of encryption cipher algorithm 85 encrypt.cipher-mode=<str> - Name of encryption cipher mode 110 encrypt.cipher-alg=<str> - Name of encryption cipher algorithm 111 encrypt.cipher-mode=<str> - Name of encryption cipher mode 136 encrypt.cipher-alg=<str> - Name of encryption cipher algorithm 137 encrypt.cipher-mode=<str> - Name of encryption cipher mode 162 encrypt.cipher-alg=<str> - Name of encryption cipher algorithm 163 encrypt.cipher-mode=<str> - Name of encryption cipher mode [all …]
|
| /openbmc/openbmc-test-automation/ipmi/ |
| H A D | test_ipmi_cipher.robot | 30 FOR ${cipher} IN @{valid_ciphers} 31 Run External IPMI Standard Command power status C=${cipher} 38 FOR ${cipher} IN @{unsupported_ciphers} 40 ... Run External IPMI Standard Command power status C=${cipher} 75 # Example cipher entry: 3 17 83 [Documentation] Verify cipher ID and Supported Algorithms for all Available 139 # data_list cipher suite records in list 158 # response_data Response data of get channel cipher suite IPMI raw command 159 # e.g 01 c0 11 03 44 81 ---> list of algorithms by cipher suite (0x80 in request data 3rd byte) 174 # response_data response data of get channel cipher suit [all...] |
| /openbmc/qemu/backends/ |
| H A D | cryptodev-builtin.c | 44 QCryptoCipher *cipher; member 223 QCryptoCipher *cipher; in cryptodev_builtin_create_cipher_session() local 290 cipher = qcrypto_cipher_new(algo, mode, in cryptodev_builtin_create_cipher_session() 294 if (!cipher) { in cryptodev_builtin_create_cipher_session() 299 sess->cipher = cipher; in cryptodev_builtin_create_cipher_session() 436 if (session->cipher) { in cryptodev_builtin_close_session() 437 qcrypto_cipher_free(session->cipher); in cryptodev_builtin_close_session() 463 ret = qcrypto_cipher_setiv(sess->cipher, op_info->iv, in cryptodev_builtin_sym_operation() 471 ret = qcrypto_cipher_encrypt(sess->cipher, op_info->src, in cryptodev_builtin_sym_operation() 477 ret = qcrypto_cipher_decrypt(sess->cipher, op_info->src, in cryptodev_builtin_sym_operation()
|
| /openbmc/phosphor-host-ipmid/app/ |
| H A D | channel.hpp | 26 namespace cipher namespace 33 static constexpr auto cipher = "cipher"; variable
|