Home
last modified time | relevance | path

Searched full:cipher (Results 1 – 25 of 156) sorted by relevance

1234567

/openbmc/qemu/include/crypto/
H A Dcipher.h2 * QEMU Crypto cipher algorithms
48 * QCryptoCipher *cipher;
54 * error_report(errp, "Feature <blah> requires AES cipher support");
58 * cipher = qcrypto_cipher_new(QCRYPTO_CIPHER_ALGO_AES_128,
62 * if (!cipher) {
66 * if (qcrypto_cipher_set_iv(cipher, iv, keylen, errp) < 0) {
70 * if (qcrypto_cipher_encrypt(cipher, rawdata, encdata, datalen, errp) < 0) {
74 * qcrypto_cipher_free(cipher);
88 * @alg: the cipher algorithm
89 * @mode: the cipher mode
[all …]
H A Divgen.h24 #include "crypto/cipher.h"
29 * vectors for block encryption schemes using chained cipher modes
55 * QCryptoCipher *cipher = qcrypto_cipher_new(QCRYPTO_CIPHER_ALGO_AES_128,
58 * if (!cipher) {
71 * if (qcrypto_cipher_setiv(cipher, iv, niv, errp) < 0) {
74 * if (qcrypto_cipher_encrypt(cipher,
86 * qcrypto_cipher_free(cipher);
92 * qcrypto_cipher_free(cipher);
106 * @cipheralg: the cipher algorithm or 0
177 * Get the cipher algorithm used by this IV generator (if
[all …]
H A Dtls-cipher-suites.h2 * QEMU TLS Cipher Suites Registry (RFC8447)
17 #define TYPE_QCRYPTO_TLS_CIPHER_SUITES "tls-cipher-suites"
24 * @obj: pointer to a TLS cipher suites object
/openbmc/openbmc-test-automation/ipmi/
H A Dtest_ipmi_cipher.robot13 Suite Setup IPMI Cipher Suite Setup
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}
49 # Example 'RMCP+ Cipher Suites' entry: 3,17
50 ${ciphers}= Split String ${lan_print['RMCP+ Cipher Suites']} ,
55 Verify Supported Cipher Via Getciphers
75 # Example cipher entry: 3 17
82 Verify Cipher Suit
[all...]
/openbmc/qemu/tests/unit/
H A Dtest-crypto-cipher.c2 * QEMU Crypto cipher algorithms
24 #include "crypto/cipher.h"
45 .path = "/crypto/cipher/aes-ecb-128",
62 .path = "/crypto/cipher/aes-ecb-192",
79 .path = "/crypto/cipher/aes-ecb-256",
98 .path = "/crypto/cipher/aes-cbc-128",
116 .path = "/crypto/cipher/aes-cbc-192",
134 .path = "/crypto/cipher/aes-cbc-256",
158 .path = "/crypto/cipher/des-ecb-56-one-block",
167 .path = "/crypto/cipher/des-cbc-56-one-block",
[all …]
H A Dtest-crypto-block.c251 QCryptoCipher *cipher; in test_block_assert_setup()
254 cipher = qcrypto_block_get_cipher(blk); in test_block_assert_setup()
257 g_assert(cipher); in test_block_assert_setup()
259 g_assert_cmpint(data->cipher_alg, ==, cipher->alg); in test_block_assert_setup()
260 g_assert_cmpint(data->cipher_mode, ==, cipher->mode); in test_block_assert_setup()
401 return "LUKS header cipher name is not NUL terminated"; in luks_bad_null_term_cipher_name()
410 return "LUKS header cipher mode is not NUL terminated"; in luks_bad_null_term_cipher_mode()
440 return "XTS cipher key length should be a multiple of 2"; in luks_bad_cipher_xts_size()
455 return "Unexpected cipher mode string format ''"; in luks_bad_cipher_mode_empty()
462 return "Unexpected cipher mod in luks_bad_cipher_mode_unknown()
252 QCryptoCipher *cipher; test_block_assert_setup() local
[all...]
/openbmc/phosphor-host-ipmid/app/
H A Dchannel.cpp30 namespace cipher namespace
33 /** @brief Get the supported Cipher records
35 * The cipher records are read from the JSON file and converted into
36 * 1. cipher suite record format mentioned in the IPMI specification. The
37 * records can be either OEM or standard cipher. Each json entry is parsed and
38 * converted into the cipher record format and pushed into the vector.
41 * @return pair of vector containing 1. all the cipher suite records. 2.
55 lg2::error("Channel Cipher suites file not found"); in getCipherRecords()
62 lg2::error("Parsing channel cipher suites JSON failed"); in getCipherRecords()
70 // OEM cipher suite - 0xC1 in getCipherRecords()
[all …]
H A Dchannel.hpp16 * - rspRecords - cipher suite records.
19 std::vector<uint8_t> // Cipher Records
26 namespace cipher namespace
33 static constexpr auto cipher = "cipher"; variable
43 } // namespace cipher
/openbmc/qemu/crypto/
H A Dblock.c238 /* Usually there is a free cipher available */ in qcrypto_block_pop_cipher()
246 /* Otherwise allocate a new cipher */ in qcrypto_block_pop_cipher()
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
280 /* Stash away cipher parameters for qcrypto_block_pop_cipher() */ in qcrypto_block_init_cipher()
287 * Create a new cipher to validate the parameters now. This reduces the in qcrypto_block_init_cipher()
288 * chance of cipher creation failing at I/O time. in qcrypto_block_init_cipher()
290 cipher = qcrypto_block_pop_cipher(block, errp); in qcrypto_block_init_cipher()
291 if (!cipher) { in qcrypto_block_init_cipher()
[all …]
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,
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 Divgen-essiv.c27 QCryptoCipher *cipher; member
40 nsalt = qcrypto_cipher_get_key_len(ivgen->cipher); in qcrypto_ivgen_essiv_init()
54 /* Now potentially truncate salt to match cipher key len */ 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.c2 * QEMU Crypto af_alg-backend cipher support
16 #include "crypto/cipher.h"
50 error_setg(errp, "Unsupported cipher algorithm %d", alg); in qcrypto_afalg_cipher_format_name()
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()
[all …]
H A Dcipherpriv.h2 * QEMU Crypto cipher driver supports
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 Dtls-cipher-suites.c2 * QEMU TLS Cipher Suites
15 #include "crypto/tls-cipher-suites.h"
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()
/openbmc/phosphor-host-ipmid/user_channel/
H A Dcipher_mgmt.hpp39 * @brief Class to provide cipher suite functionalities
49 /** @brief function to get cipher suite privileges from config file
51 * @param[in] chNum - channel number for which we want to get cipher suite
54 * @param[in] csPrivilegeLevels - gets filled by cipher suite privilege
62 /** @brief function to set/update cipher suite privileges in config file
64 * @param[in] chNum - channel number for which we want to update cipher
67 * @param[in] csPrivilegeLevels - cipher suite privilege levels to update
95 /** @brief convert to cipher suite privilege from string to value
99 * @return cipher suite privilege index
125 * @param[in] csFileName - user setting cipher suite privilege file name
[all …]
/openbmc/qemu/tests/bench/
H A Dbenchmark-crypto-cipher.c2 * QEMU Crypto cipher speed benchmark
16 #include "crypto/cipher.h"
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
[all …]
/openbmc/phosphor-net-ipmid/command/
H A Dchannel_auth.cpp92 static constexpr const char* cipher = "cipher"; variable
102 /** @brief Get the supported Cipher records
104 * The cipher records are read from the JSON file and converted into
105 * 1. cipher suite record format mentioned in the IPMI specification. The
106 * records can be either OEM or standard cipher. Each json entry is parsed and
107 * converted into the cipher record format and pushed into the vector.
110 * @return pair of vector containing 1. all the cipher suite records. 2.
124 lg2::error("Channel Cipher suites file not found: {ERROR}", "ERROR", in getCipherRecords()
132 lg2::error("Parsing channel cipher suites JSON failed: {ERROR}", in getCipherRecords()
141 // OEM cipher suite - 0xC1 in getCipherRecords()
[all …]
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/qemu-iotests/
H A D082.out58 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 …]
H A D14937 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])
235 cipher algorithm being unsupported, and if so, skip this test.
238 if 'Unsupported cipher algorithm' in output:
239 iotests.notrun('Unsupported cipher algorithm '
240 f'{config.cipher}-{config.keylen}-{config.mode}; '
[all …]
H A D210.out23 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
/openbmc/phosphor-net-ipmid/test/
H A Dcipher.cpp27 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/backends/
H A Dcryptodev-builtin.c2 * QEMU Cryptodev backend for QEMU cipher APIs
29 #include "crypto/cipher.h"
36 * name of backend that uses QEMU cipher API
44 QCryptoCipher *cipher; member
46 uint8_t type; /* cipher? hash? aead? */
220 QCryptoCipher *cipher; in cryptodev_builtin_create_cipher_session()
282 error_setg(errp, "Unsupported cipher alg :%u", in cryptodev_builtin_create_cipher_session()
287 cipher = qcrypto_cipher_new(algo, mode, in cryptodev_builtin_create_cipher_session()
291 if (!cipher) { in cryptodev_builtin_create_cipher_session()
296 sess->cipher in cryptodev_builtin_create_cipher_session()
223 QCryptoCipher *cipher; cryptodev_builtin_create_cipher_session() local
[all...]
/openbmc/qemu/qapi/
H A Dcryptodev.json32 # @cipher: Symmetric Key Cipher service
40 # @akcipher: Asymmetric Key Cipher service
45 'data': ['cipher', 'hash', 'mac', 'aead', 'akcipher']}

1234567