Home
last modified time | relevance | path

Searched refs:cipher (Results 1 – 25 of 377) sorted by relevance

12345678910>>...16

/openbmc/qemu/crypto/
H A Dcipher.c156 QCryptoCipher *cipher = NULL; in qcrypto_cipher_new() local
162 if (!cipher) { 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
198 int qcrypto_cipher_setiv(QCryptoCipher *cipher, in qcrypto_cipher_setiv() argument
207 void qcrypto_cipher_free(QCryptoCipher *cipher) in qcrypto_cipher_free() argument
209 if (cipher) { in qcrypto_cipher_free()
[all …]
H A Dblock.c264 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()
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()
466 if (!cipher) { in qcrypto_block_decrypt_helper()
474 qcrypto_block_push_cipher(block, cipher); in qcrypto_block_decrypt_helper()
488 if (!cipher) { in qcrypto_block_encrypt_helper()
[all …]
H A Divgen-essiv.c27 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 Dcipher-afalg.c118 qcrypto_afalg_cipher_setiv(QCryptoCipher *cipher, in qcrypto_afalg_cipher_setiv() argument
122 QCryptoAFAlg *afalg = container_of(cipher, QCryptoAFAlg, 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 QCryptoAFAlg *afalg = container_of(cipher, QCryptoAFAlg, base); in qcrypto_afalg_cipher_encrypt()
211 qcrypto_afalg_cipher_decrypt(QCryptoCipher *cipher, in qcrypto_afalg_cipher_decrypt() argument
215 QCryptoAFAlg *afalg = container_of(cipher, QCryptoAFAlg, base); in qcrypto_afalg_cipher_decrypt()
220 static void qcrypto_afalg_comm_ctx_free(QCryptoCipher *cipher) in qcrypto_afalg_comm_ctx_free() argument
222 QCryptoAFAlg *afalg = container_of(cipher, QCryptoAFAlg, base); in qcrypto_afalg_comm_ctx_free()
H A Dcipher-builtin.c.inc2 * 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,
143 = container_of(cipher, QCryptoCipherBuiltinAES, base);
157 = container_of(cipher, QCryptoCipherBuiltinAES, base);
171 = container_of(cipher, QCryptoCipherBuiltinAES, base);
185 = container_of(cipher, QCryptoCipherBuiltinAES, base);
198 = container_of(cipher, QCryptoCipherBuiltinAES, base);
294 "Unsupported cipher algorithm %s",
[all …]
H A Dcipherpriv.h21 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 Dcipher-gcrypt.c.inc2 * 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,
171 static int qcrypto_gcrypt_setiv(QCryptoCipher *cipher,
194 static int qcrypto_gcrypt_ctr_setiv(QCryptoCipher *cipher,
248 error_setg(errp, "Unsupported cipher algorithm %s",
255 error_setg(errp, "Unsupported cipher mode %s",
[all …]
/openbmc/linux/Documentation/crypto/
H A Darchitecture.rst8 cipher types:
131 cipher allocation API calls
154 - aead for AEAD cipher type
178 When allocating a cipher handle, the caller only specifies the cipher
229 cipher implementation for the given cipher name. That means, even when a
240 implement the complete cipher.
266 the AES cipher are all merged into one cipher implementation registered
278 implemented in the cipher.
310 | cipher |
330 invokes AEAD cipher operations with the GCM cipher handle.
[all …]
H A Dintro.rst19 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 Dcrypto4xx_alg.c74 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_crypt()
127 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes()
257 size_t iv_len = crypto_skcipher_ivsize(cipher); in crypto4xx_ctr_crypt()
288 struct crypto_skcipher *cipher, in crypto4xx_sk_setup_fallback() argument
294 crypto_sync_skcipher_set_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback()
309 return crypto4xx_setkey_aes(cipher, key, keylen, in crypto4xx_setkey_aes_ctr()
367 struct crypto_aead *cipher, in crypto4xx_aead_setup_fallback() argument
373 crypto_aead_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_aead_setup_fallback()
384 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_ccm()
486 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setauthsize_aead()
[all …]
H A Dcrypto4xx_core.h125 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 Dcipher.cpp27 auto algoPtr = std::make_unique<cipher::integrity::AlgoSHA1>(sik); in TEST()
65 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()
367 auto cryptPtr = std::make_unique<cipher::crypt::AlgoAES128>(k2); in TEST()
371 auto cipher = cryptPtr->encryptPayload(payload); in TEST() local
380 cipher.data())) in TEST()
388 cipher.size() + cipher::crypt::AlgoAES128::AESCBC128BlockSize); in TEST()
393 cipher.data() + cipher::crypt::AlgoAES128::AESCBC128ConfHeader, in TEST()
394 cipher.size() - cipher::crypt::AlgoAES128::AESCBC128ConfHeader)) in TEST()
[all …]
/openbmc/linux/crypto/
H A Dcbc.c25 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()
100 struct crypto_cipher *cipher; in crypto_cbc_decrypt_segment() local
105 tfm = crypto_cipher_tfm(cipher); in crypto_cbc_decrypt_segment()
130 struct crypto_cipher *cipher; in crypto_cbc_decrypt_inplace() local
[all …]
H A Decb.c17 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 Dtest-crypto-cipher.c653 QCryptoCipher *cipher; in test_cipher() local
676 cipher = qcrypto_cipher_new( in test_cipher()
741 qcrypto_cipher_free(cipher); in test_cipher()
747 QCryptoCipher *cipher; in test_cipher_null_iv() local
752 cipher = qcrypto_cipher_new( in test_cipher_null_iv()
757 g_assert(cipher != NULL); in test_cipher_null_iv()
767 qcrypto_cipher_free(cipher); in test_cipher_null_iv()
773 QCryptoCipher *cipher; in test_cipher_short_plaintext() local
781 cipher = qcrypto_cipher_new( in test_cipher_short_plaintext()
786 g_assert(cipher != NULL); in test_cipher_short_plaintext()
[all …]
/openbmc/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_skcipher.c41 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()
84 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_cbc_cipher_callback()
169 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in nitrox_skcipher_setkey()
252 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_skcipher_crypt()
294 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_cbc_decrypt()
323 return verify_skcipher_des3_key(cipher, key) ?: in nitrox_3des_setkey()
[all …]
/openbmc/phosphor-net-ipmid/command/
H A Dopen_session.cpp33 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 Drakp34.cpp25 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 …]
/openbmc/qemu/tests/bench/
H A Dbenchmark-crypto-cipher.c22 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 DKconfig135 Block ciphers: AES cipher algorithms (FIPS-197)
138 AEAD cipher: AES with CBC, ESSIV, and SHA-256
161 with block cipher modes:
178 with block cipher modes:
196 stream cipher algorithms
209 with block cipher modes:
240 with block cipher modes:
259 with block cipher modes:
276 AEAD cipher: AES cipher algorithms (FIPS-197) with
292 AEAD cipher: SM4 cipher algorithms (OSCCA GB/T 32907-2016) with
[all …]
/openbmc/linux/arch/x86/crypto/
H A DKconfig25 Block cipher: AES cipher algorithms
39 Block cipher: Blowfish cipher algorithm
50 Block cipher: Camellia cipher algorithms
122 Block cipher: Triple DES EDE (FIPS 46-3) cipher algorithm
241 Block cipher: Twofish cipher algorithm
252 Block cipher: Twofish cipher algorithm
263 Length-preserving cipher: Twofish cipher algorithm
281 Length-preserving cipher: Twofish cipher algorithm
297 Length-preserving cipher: ARIA cipher algorithms
316 Length-preserving cipher: ARIA cipher algorithms
[all …]
/openbmc/openbmc/poky/meta/recipes-support/libgcrypt/files/
H A D0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch9 compiling cipher.
24 cipher/Makefile.am | 2 +-
27 diff --git a/cipher/Makefile.am b/cipher/Makefile.am
29 --- a/cipher/Makefile.am
30 +++ b/cipher/Makefile.am
/openbmc/linux/drivers/crypto/cavium/cpt/
H A Dcptvf_algs.c235 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()
305 return cvm_setkey(cipher, key, keylen, AES_CBC); in cvm_cbc_aes_setkey()
311 return cvm_setkey(cipher, key, keylen, AES_ECB); in cvm_ecb_aes_setkey()
317 return cvm_setkey(cipher, key, keylen, AES_CFB); in cvm_cfb_aes_setkey()
323 return verify_skcipher_des3_key(cipher, key) ?: in cvm_cbc_des3_setkey()
324 cvm_setkey(cipher, key, keylen, DES3_CBC); in cvm_cbc_des3_setkey()
330 return verify_skcipher_des3_key(cipher, key) ?: in cvm_ecb_des3_setkey()
[all …]
/openbmc/linux/net/sunrpc/auth_gss/
H A Dgss_krb5_crypto.c597 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()
793 cipher = kctx->initiator_enc; in gss_krb5_aes_encrypt()
797 cipher = kctx->acceptor_enc; in gss_krb5_aes_encrypt()
869 cipher = kctx->acceptor_enc; in gss_krb5_aes_decrypt()
873 cipher = kctx->initiator_enc; in gss_krb5_aes_decrypt()
1023 cipher = kctx->initiator_enc; in krb5_etm_encrypt()
1027 cipher = kctx->acceptor_enc; in krb5_etm_encrypt()
1060 err = krb5_etm_checksum(cipher, ahash, in krb5_etm_encrypt()
1112 cipher = kctx->acceptor_enc; in krb5_etm_decrypt()
[all …]
/openbmc/qemu/include/crypto/
H A Dcipher.h171 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,

12345678910>>...16