Home
last modified time | relevance | path

Searched refs:cipher_cfg (Results 1 – 5 of 5) sorted by relevance

/OK3568_Linux_fs/external/security/librkcrypto/test/
H A Dtest_cipher.c94 rk_cipher_config cipher_cfg; in test_cipher_item_virt() local
142 memset(&cipher_cfg, 0x00, sizeof(cipher_cfg)); in test_cipher_item_virt()
143 cipher_cfg.algo = algo; in test_cipher_item_virt()
144 cipher_cfg.mode = mode; in test_cipher_item_virt()
145 cipher_cfg.operation = operation; in test_cipher_item_virt()
146 cipher_cfg.key_len = key_len; in test_cipher_item_virt()
148 test_get_rng(cipher_cfg.key, key_len); in test_cipher_item_virt()
149 test_get_rng(cipher_cfg.iv, iv_len); in test_cipher_item_virt()
150 memcpy(iv_tmp, cipher_cfg.iv, iv_len); in test_cipher_item_virt()
152 res = rk_cipher_init(&cipher_cfg, &cipher_hdl); in test_cipher_item_virt()
[all …]
H A Dtest_otp_key_crypto.c151 rk_cipher_config cipher_cfg; in test_otp_key_item_virt() local
193 memset(&cipher_cfg, 0x00, sizeof(cipher_cfg)); in test_otp_key_item_virt()
194 test_get_rng(cipher_cfg.iv, item->iv_len); in test_otp_key_item_virt()
223 cipher_cfg.algo = algo; in test_otp_key_item_virt()
224 cipher_cfg.mode = mode; in test_otp_key_item_virt()
225 cipher_cfg.operation = operation; in test_otp_key_item_virt()
226 cipher_cfg.key_len = key_len; in test_otp_key_item_virt()
227 cipher_cfg.reserved = NULL; in test_otp_key_item_virt()
229 rk_res = rk_oem_otp_key_cipher_virt(key_id, &cipher_cfg, in test_otp_key_item_virt()
243 cipher_cfg.iv, plain, data_len, cipher_soft); in test_otp_key_item_virt()
[all …]
H A Dtest_multi.c55 rk_cipher_config cipher_cfg; in test_nosupport_multi() local
59 memset(&cipher_cfg, 0x00, sizeof(cipher_cfg)); in test_nosupport_multi()
61 cipher_cfg.algo = RK_ALGO_AES; in test_nosupport_multi()
62 cipher_cfg.mode = RK_CIPHER_MODE_ECB; in test_nosupport_multi()
63 cipher_cfg.operation = RK_OP_CIPHER_ENC; in test_nosupport_multi()
64 cipher_cfg.key_len = 16; in test_nosupport_multi()
72 res = rk_cipher_init(&cipher_cfg, &hdl_cipher1); in test_nosupport_multi()
78 res = rk_cipher_init(&cipher_cfg, &hdl_cipher2); in test_nosupport_multi()
102 res = rk_cipher_init(&cipher_cfg, &hdl_cipher2); in test_nosupport_multi()
/OK3568_Linux_fs/external/security/librkcrypto/src/
H A Drkcrypto_core.c485 rk_cipher_config *cipher_cfg; in rk_cipher_crypt() local
492 cipher_cfg = rk_get_sess_config(handle); in rk_cipher_crypt()
493 if (!cipher_cfg) { in rk_cipher_crypt()
505 cryp.iv = (void *)cipher_cfg->iv; in rk_cipher_crypt()
506 cryp.op = rkop_to_cop(cipher_cfg->operation); in rk_cipher_crypt()
515 res = rk_update_user_iv(cipher_cfg); in rk_cipher_crypt()
528 rk_cipher_config *cipher_cfg; in rk_cipher_crypt_virt() local
535 cipher_cfg = rk_get_sess_config(handle); in rk_cipher_crypt_virt()
536 if (!cipher_cfg) { in rk_cipher_crypt_virt()
548 cryp.iv = (void *)cipher_cfg->iv; in rk_cipher_crypt_virt()
[all …]
/OK3568_Linux_fs/kernel/drivers/crypto/
H A Dixp4xx_crypto.c755 u32 cipher_cfg; in setup_cipher() local
765 cipher_cfg = cipher_cfg_enc(tfm); in setup_cipher()
768 cipher_cfg = cipher_cfg_dec(tfm); in setup_cipher()
770 if (cipher_cfg & MOD_AES) { in setup_cipher()
778 cipher_cfg |= keylen_cfg; in setup_cipher()
785 *(u32*)cinfo = cpu_to_be32(cipher_cfg); in setup_cipher()
786 cinfo += sizeof(cipher_cfg); in setup_cipher()
791 if (key_len < DES3_EDE_KEY_SIZE && !(cipher_cfg & MOD_AES)) { in setup_cipher()
795 dir->npe_ctx_idx = sizeof(cipher_cfg) + key_len; in setup_cipher()
797 if ((cipher_cfg & MOD_AES) && !encrypt) { in setup_cipher()