Lines Matching refs:key

377 static void ltc_set_key(LTC_Type *base, const uint8_t *key, uint8_t keySize)  in ltc_set_key()  argument
383 base->KEY[i] = ltc_get_word_from_unaligned(&key[i * sizeof(uint32_t)]); in ltc_set_key()
396 static void ltc_get_key(LTC_Type *base, uint8_t *key, uint8_t keySize) in ltc_get_key() argument
402 ltc_set_unaligned_from_word(base->KEY[i], &key[i * sizeof(uint32_t)]); in ltc_get_key()
497 const uint8_t *key, in ltc_symmetric_alg_state() argument
514 ltc_set_key(base, key, keySize); in ltc_symmetric_alg_state()
544 const uint8_t *key, in ltc_symmetric_update() argument
550 return ltc_symmetric_alg_state(base, key, keySize, alg, mode, enc, kLTC_ModeUpdate); in ltc_symmetric_update()
566 const uint8_t *key, in ltc_symmetric_final() argument
572 return ltc_symmetric_alg_state(base, key, keySize, alg, mode, enc, kLTC_ModeFinalize); in ltc_symmetric_final()
588 const uint8_t *key, in ltc_symmetric_init() argument
594 return ltc_symmetric_alg_state(base, key, keySize, alg, mode, enc, kLTC_ModeInit); in ltc_symmetric_init()
609 const uint8_t *key, in ltc_symmetric_init_final() argument
615 return ltc_symmetric_alg_state(base, key, keySize, alg, mode, enc, kLTC_ModeInitFinal); in ltc_symmetric_init_final()
1120 const uint8_t *key, in ltc_aes_decrypt_ecb() argument
1127 …retval = ltc_symmetric_update(base, key, (uint8_t)keySize, kLTC_AlgorithmAES, kLTC_ModeECB, kLTC_M… in ltc_aes_decrypt_ecb()
1196 …const uint8_t *plaintext, uint8_t *ciphertext, uint32_t size, const uint8_t *key, uint32_t keySize) in LTC_AES_EncryptEcb() argument
1211 …retval = ltc_symmetric_update(base, key, (uint8_t)keySize, kLTC_AlgorithmAES, kLTC_ModeECB, kLTC_M… in LTC_AES_EncryptEcb()
1241 const uint8_t *key, in LTC_AES_DecryptEcb() argument
1257 status = ltc_aes_decrypt_ecb(base, ciphertext, plaintext, size, key, keySize, keyType); in LTC_AES_DecryptEcb()
1279 const uint8_t *key, in LTC_AES_EncryptCbc() argument
1296 …retval = ltc_symmetric_update(base, key, (uint8_t)keySize, kLTC_AlgorithmAES, kLTC_ModeCBC, kLTC_M… in LTC_AES_EncryptCbc()
1333 const uint8_t *key, in LTC_AES_DecryptCbc() argument
1350 …retval = ltc_symmetric_update(base, key, (uint8_t)keySize, kLTC_AlgorithmAES, kLTC_ModeCBC, kLTC_M… in LTC_AES_DecryptCbc()
1403 const uint8_t *key, in LTC_AES_CryptCtr() argument
1442 …retval = ltc_symmetric_update(base, key, (uint8_t)keySize, kLTC_AlgorithmAES, kLTC_ModeCTR, kLTC_M… in LTC_AES_CryptCtr()
1509 const uint8_t *key, in ltc_aes_gcm_check_input_args() argument
1523 if ((NULL == key) || ((0U != ivSize) && (NULL == iv)) || ((0U != aadSize) && (NULL == aad)) || in ltc_aes_gcm_check_input_args()
1632 const uint8_t *key, in ltc_aes_gcm_process() argument
1646 …retval = ltc_aes_gcm_check_input_args(base, src, iv, aad, key, dst, inputSize, ivSize, aadSize, ke… in ltc_aes_gcm_process()
1669 …(void)ltc_symmetric_final(base, key, (uint8_t)keySize, kLTC_AlgorithmAES, kLTC_ModeGCM, encryptMod… in ltc_aes_gcm_process()
1713 …retval = ltc_symmetric_init(base, key, (uint8_t)keySize, kLTC_AlgorithmAES, kLTC_ModeGCM, encryptM… in ltc_aes_gcm_process()
1804 const uint8_t *key, in LTC_AES_EncryptTagGcm() argument
1811 …tc_aes_gcm_process(base, kLTC_ModeEncrypt, plaintext, size, iv, ivSize, aad, aadSize, key, keySize, in LTC_AES_EncryptTagGcm()
1846 const uint8_t *key, in LTC_AES_DecryptTagGcm() argument
1861 …c_aes_gcm_process(base, kLTC_ModeDecrypt, ciphertext, size, iv, ivSize, aad, aadSize, key, keySize, in LTC_AES_DecryptTagGcm()
1875 const uint8_t *key, in ltc_aes_ccm_check_input_args() argument
1888 if ((NULL == src) || (NULL == iv) || (NULL == key) || (NULL == dst)) in ltc_aes_ccm_check_input_args()
2058 const uint8_t *key, in ltc_aes_ccm_process() argument
2070 … retval = ltc_aes_ccm_check_input_args(base, src, iv, key, dst, ivSize, aadSize, keySize, tagSize); in ltc_aes_ccm_process()
2091 …retval = ltc_symmetric_init_final(base, key, (uint8_t)keySize, kLTC_AlgorithmAES, kLTC_ModeCCM, en… in ltc_aes_ccm_process()
2099 …retval = ltc_symmetric_init(base, key, (uint8_t)keySize, kLTC_AlgorithmAES, kLTC_ModeCCM, encryptM… in ltc_aes_ccm_process()
2174 const uint8_t *key, in LTC_AES_EncryptTagCcm() argument
2180 …tc_aes_ccm_process(base, kLTC_ModeEncrypt, plaintext, size, iv, ivSize, aad, aadSize, key, keySize, in LTC_AES_EncryptTagCcm()
2215 const uint8_t *key, in LTC_AES_DecryptTagCcm() argument
2231 …c_aes_ccm_process(base, kLTC_ModeDecrypt, ciphertext, size, iv, ivSize, aad, aadSize, key, keySize, in LTC_AES_DecryptTagCcm()
2247 const uint8_t key[LTC_DES_KEY_SIZE], in ltc_des_process()
2260 …retval = ltc_symmetric_update(base, &key[0], LTC_DES_KEY_SIZE, kLTC_AlgorithmDES, modeAs, modeEnc); in ltc_des_process()
2310 uint8_t key[LTC_DES_KEY_SIZE * 3]; in ltc_3des_process() local
2319 ltc_memcpy(&key[0], &key1[0], LTC_DES_KEY_SIZE); in ltc_3des_process()
2320 ltc_memcpy(&key[LTC_DES_KEY_SIZE], &key2[0], LTC_DES_KEY_SIZE); in ltc_3des_process()
2323 ltc_memcpy(&key[LTC_DES_KEY_SIZE * 2], &key3[0], LTC_DES_KEY_SIZE); in ltc_3des_process()
2324 keySize = (uint8_t)sizeof(key); in ltc_3des_process()
2328 retval = ltc_symmetric_update(base, &key[0], keySize, kLTC_Algorithm3DES, modeAs, modeEnc); in ltc_3des_process()
2364 …LTC_Type *base, const uint8_t *plaintext, uint8_t *ciphertext, uint32_t size, const uint8_t key[LT… in LTC_DES_EncryptEcb()
2366 …return ltc_des_process(base, plaintext, ciphertext, size, NULL, key, kLTC_ModeECB, kLTC_ModeEncryp… in LTC_DES_EncryptEcb()
2382 …LTC_Type *base, const uint8_t *ciphertext, uint8_t *plaintext, uint32_t size, const uint8_t key[LT… in LTC_DES_DecryptEcb()
2384 …return ltc_des_process(base, ciphertext, plaintext, size, NULL, key, kLTC_ModeECB, kLTC_ModeDecryp… in LTC_DES_DecryptEcb()
2406 const uint8_t key[LTC_DES_KEY_SIZE]) in LTC_DES_EncryptCbc()
2408 …return ltc_des_process(base, plaintext, ciphertext, size, iv, key, kLTC_ModeCBC, kLTC_ModeEncrypt); in LTC_DES_EncryptCbc()
2430 const uint8_t key[LTC_DES_KEY_SIZE]) in LTC_DES_DecryptCbc()
2432 …return ltc_des_process(base, ciphertext, plaintext, size, iv, key, kLTC_ModeCBC, kLTC_ModeDecrypt); in LTC_DES_DecryptCbc()
2453 const uint8_t key[LTC_DES_KEY_SIZE]) in LTC_DES_EncryptCfb()
2455 …return ltc_des_process(base, plaintext, ciphertext, size, iv, key, kLTC_ModeCFB, kLTC_ModeEncrypt); in LTC_DES_EncryptCfb()
2476 const uint8_t key[LTC_DES_KEY_SIZE]) in LTC_DES_DecryptCfb()
2478 …return ltc_des_process(base, ciphertext, plaintext, size, iv, key, kLTC_ModeCFB, kLTC_ModeDecrypt); in LTC_DES_DecryptCfb()
2500 const uint8_t key[LTC_DES_KEY_SIZE]) in LTC_DES_EncryptOfb()
2502 …return ltc_des_process(base, plaintext, ciphertext, size, iv, key, kLTC_ModeOFB, kLTC_ModeEncrypt); in LTC_DES_EncryptOfb()
2524 const uint8_t key[LTC_DES_KEY_SIZE]) in LTC_DES_DecryptOfb()
2526 …return ltc_des_process(base, ciphertext, plaintext, size, iv, key, kLTC_ModeOFB, kLTC_ModeDecrypt); in LTC_DES_DecryptOfb()
3028 LTC_Type *base, ltc_hash_ctx_t *ctx, ltc_hash_algo_t algo, const uint8_t *key, uint32_t keySize) in ltc_hash_check_input_args() argument
3043 if ((NULL == key) || (!ltc_check_key_size(keySize))) in ltc_hash_check_input_args()
3108 uint8_t *key; in ltc_hash_engine_init() local
3123 key = (uint8_t *)&ctx->word[kLTC_HashCtxKeyStartIdx]; in ltc_hash_engine_init()
3127 … (void)ltc_symmetric_init(base, key, (uint8_t)keySize, kLTC_AlgorithmAES, algo, kLTC_ModeEncrypt); in ltc_hash_engine_init()
3546 …it(LTC_Type *base, ltc_hash_ctx_t *ctx, ltc_hash_algo_t algo, const uint8_t *key, uint32_t keySize) in LTC_HASH_Init() argument
3552 ret = ltc_hash_check_input_args(base, ctx, algo, key, keySize); in LTC_HASH_Init()
3571 ltc_memcpy(&ctxInternal->word[kLTC_HashCtxKeyStartIdx], key, keySize); in LTC_HASH_Init()
3797 const uint8_t *key, in LTC_HASH() argument
3805 status = LTC_HASH_Init(base, &ctx, algo, key, keySize); in LTC_HASH()