/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 | 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-builtin.c.inc | 2 * QEMU Crypto cipher built-in algorithms 48 static void qcrypto_cipher_ctx_free(QCryptoCipher *cipher) 50 g_free(cipher); 53 static int qcrypto_cipher_no_setiv(QCryptoCipher *cipher, 138 static int qcrypto_cipher_aes_encrypt_ecb(QCryptoCipher *cipher, 143 = container_of(cipher, QCryptoCipherBuiltinAES, base); 152 static int qcrypto_cipher_aes_decrypt_ecb(QCryptoCipher *cipher, 157 = container_of(cipher, QCryptoCipherBuiltinAES, base); 166 static int qcrypto_cipher_aes_encrypt_cbc(QCryptoCipher *cipher, 171 = container_of(cipher, QCryptoCipherBuiltinAES, base); [all …]
|
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 | 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);
|
/openbmc/linux/Documentation/crypto/ |
H A D | architecture.rst | 8 cipher types: 33 A single block cipher may even be called with multiple templates. 34 However, templates cannot be used without a single cipher. 63 When using the synchronous API operation, the caller invokes a cipher 65 That means, the caller waits until the cipher operation completes. 71 implies that the invocation of a cipher operation will complete almost 72 instantly. That invocation triggers the cipher operation but it does not 73 signal its completion. Before invoking a cipher operation, the caller 75 signal the completion of the cipher operation. Furthermore, the caller 84 A cipher is referenced by the caller with a string. That string has the [all …]
|
H A D | intro.rst | 19 Therefore, a cipher handle variable usually has the name "tfm". Besides 37 Note: The terms "transformation" and cipher algorithm are used 56 to as a "cipher handle". Such a cipher handle is always subject to the 58 a cipher handle: 60 1. Initialization of a cipher handle. 62 2. Execution of all intended cipher operations applicable for the handle 63 where the cipher handle must be furnished to every API call. 65 3. Destruction of a cipher handle. 67 When using the initialization API calls, a cipher handle is created and
|
/openbmc/linux/drivers/crypto/amcc/ |
H A D | crypto4xx_alg.c | 73 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_crypt() local 74 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_crypt() 121 static int crypto4xx_setkey_aes(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes() argument 127 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes() 177 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cbc() argument 180 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CBC, in crypto4xx_setkey_aes_cbc() 184 int crypto4xx_setkey_aes_cfb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cfb() argument 187 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CFB, in crypto4xx_setkey_aes_cfb() 191 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ecb() argument 194 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_ECB, in crypto4xx_setkey_aes_ecb() [all …]
|
H A D | crypto4xx_core.h | 125 struct crypto_sync_skcipher *cipher; member 137 struct skcipher_alg cipher; member 163 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, 165 int crypto4xx_setkey_aes_cfb(struct crypto_skcipher *cipher, 167 int crypto4xx_setkey_aes_ctr(struct crypto_skcipher *cipher, 169 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, 171 int crypto4xx_setkey_aes_ofb(struct crypto_skcipher *cipher, 173 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher, 236 int crypto4xx_setkey_aes_ccm(struct crypto_aead *cipher, 240 int crypto4xx_setkey_aes_gcm(struct crypto_aead *cipher,
|
/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/linux/crypto/ |
H A D | cbc.c | 25 struct crypto_cipher *cipher; in crypto_cbc_encrypt_segment() local 29 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_encrypt_segment() 30 tfm = crypto_cipher_tfm(cipher); in crypto_cbc_encrypt_segment() 31 fn = crypto_cipher_alg(cipher)->cia_encrypt; in crypto_cbc_encrypt_segment() 52 struct crypto_cipher *cipher; in crypto_cbc_encrypt_inplace() local 56 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_encrypt_inplace() 57 tfm = crypto_cipher_tfm(cipher); in crypto_cbc_encrypt_inplace() 58 fn = crypto_cipher_alg(cipher)->cia_encrypt; in crypto_cbc_encrypt_inplace() 100 struct crypto_cipher *cipher; in crypto_cbc_decrypt_segment() local 104 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_decrypt_segment() [all …]
|
H A D | ecb.c | 17 struct crypto_cipher *cipher, in crypto_ecb_crypt() argument 20 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ecb_crypt() 32 fn(crypto_cipher_tfm(cipher), dst, src); in crypto_ecb_crypt() 47 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_ecb_encrypt() local 49 return crypto_ecb_crypt(req, cipher, in crypto_ecb_encrypt() 50 crypto_cipher_alg(cipher)->cia_encrypt); in crypto_ecb_encrypt() 56 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_ecb_decrypt() local 58 return crypto_ecb_crypt(req, cipher, in crypto_ecb_decrypt() 59 crypto_cipher_alg(cipher)->cia_decrypt); in crypto_ecb_decrypt()
|
/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/linux/drivers/crypto/cavium/nitrox/ |
H A D | nitrox_skcipher.c | 41 const struct nitrox_cipher *cipher = flexi_cipher_table; in flexi_cipher_type() local 43 while (cipher->name) { in flexi_cipher_type() 44 if (!strcmp(cipher->name, name)) in flexi_cipher_type() 46 cipher++; in flexi_cipher_type() 48 return cipher->value; in flexi_cipher_type() 83 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(skreq); in nitrox_cbc_cipher_callback() local 84 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_cbc_cipher_callback() 165 static inline int nitrox_skcipher_setkey(struct crypto_skcipher *cipher, in nitrox_skcipher_setkey() argument 169 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in nitrox_skcipher_setkey() 197 static int nitrox_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in nitrox_aes_setkey() argument [all …]
|
/openbmc/phosphor-net-ipmid/command/ |
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 | 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()
|
/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/linux/arch/arm64/crypto/ |
H A D | Kconfig | 135 Block ciphers: AES cipher algorithms (FIPS-197) 138 AEAD cipher: AES with CBC, ESSIV, and SHA-256 149 Block ciphers: AES cipher algorithms (FIPS-197) 160 Length-preserving ciphers: AES cipher algorithms (FIPS-197) 161 with block cipher modes: 177 Length-preserving ciphers: AES cipher algorithms (FIPS-197) 178 with block cipher modes: 196 stream cipher algorithms 208 Length-preserving ciphers: AES cipher algorithms (FIPS-197) 209 with block cipher modes: [all …]
|
/openbmc/linux/arch/x86/crypto/ |
H A D | Kconfig | 25 Block cipher: AES cipher algorithms 26 AEAD cipher: AES with GCM 39 Block cipher: Blowfish cipher algorithm 50 Block cipher: Camellia cipher algorithms 89 Length-preserving ciphers: CAST5 (CAST-128) cipher algorithm 107 Length-preserving ciphers: CAST6 (CAST-256) cipher algorithm 122 Block cipher: Triple DES EDE (FIPS 46-3) cipher algorithm 137 Length-preserving ciphers: Serpent cipher algorithm 153 Length-preserving ciphers: Serpent cipher algorithm 170 Length-preserving ciphers: Serpent cipher algorithm [all …]
|
/openbmc/openbmc/poky/meta/recipes-support/libgcrypt/files/ |
H A D | 0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch | 4 Subject: [PATCH] random:cipher: handle substitution in sed command 8 * cipher/Makefile.am (o_flag_munging): Add 'g' flag for first sed 14 Makefile.am of cipher and random 20 cipher/Makefile.am | 2 +- 24 diff --git a/cipher/Makefile.am b/cipher/Makefile.am 26 --- a/cipher/Makefile.am 27 +++ b/cipher/Makefile.am
|
/openbmc/linux/drivers/crypto/cavium/cpt/ |
H A D | cptvf_algs.c | 232 static int cvm_xts_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_xts_setkey() argument 235 struct cvm_enc_ctx *ctx = crypto_skcipher_ctx(cipher); in cvm_xts_setkey() 240 err = xts_verify_key(cipher, key, keylen); in cvm_xts_setkey() 288 static int cvm_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_setkey() argument 291 struct cvm_enc_ctx *ctx = crypto_skcipher_ctx(cipher); in cvm_setkey() 302 static int cvm_cbc_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_cbc_aes_setkey() argument 305 return cvm_setkey(cipher, key, keylen, AES_CBC); in cvm_cbc_aes_setkey() 308 static int cvm_ecb_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_ecb_aes_setkey() argument 311 return cvm_setkey(cipher, key, keylen, AES_ECB); in cvm_ecb_aes_setkey() 314 static int cvm_cfb_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_cfb_aes_setkey() argument [all …]
|
/openbmc/linux/net/sunrpc/auth_gss/ |
H A D | gss_krb5_crypto.c | 592 gss_krb5_cts_crypt(struct crypto_sync_skcipher *cipher, struct xdr_buf *buf, in gss_krb5_cts_crypt() argument 597 SYNC_SKCIPHER_REQUEST_ON_STACK(req, cipher); in gss_krb5_cts_crypt() 626 skcipher_request_set_sync_tfm(req, cipher); in gss_krb5_cts_crypt() 649 memcpy(iv, data, crypto_sync_skcipher_ivsize(cipher)); in gss_krb5_cts_crypt() 787 struct crypto_sync_skcipher *cipher, *aux_cipher; in gss_krb5_aes_encrypt() local 793 cipher = kctx->initiator_enc; in gss_krb5_aes_encrypt() 797 cipher = kctx->acceptor_enc; in gss_krb5_aes_encrypt() 801 conflen = crypto_sync_skcipher_blocksize(cipher); in gss_krb5_aes_encrypt() 843 err = krb5_cbc_cts_encrypt(cipher, aux_cipher, in gss_krb5_aes_encrypt() 860 struct crypto_sync_skcipher *cipher, *aux_cipher; in gss_krb5_aes_decrypt() local [all …]
|
/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 …]
|