Home
last modified time | relevance | path

Searched refs:nonce (Results 1 – 25 of 56) sorted by relevance

123

/optee_os/core/lib/libtomcrypt/src/stream/salsa20/
H A Dxsalsa20_test.c36 …const unsigned char nonce[] = {0x69,0x69,0x6e,0xe9,0x55,0xb6,0x2b,0x73,0xcd,0x62,0xbd,0xa8,0x75,0x… in xsalsa20_test()
45 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
49 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
57 …if ((err = xsalsa20_memory(key, sizeof(key), 20, nonce, sizeof(nonce), msg, msglen, ciphertext)) … in xsalsa20_test()
58 …if ((err = xsalsa20_memory(key, sizeof(key), 20, nonce, sizeof(nonce), ciphertext, msglen, msg2)) … in xsalsa20_test()
68 …const unsigned char nonce[] = {0x69,0x69,0x6e,0xe9,0x55,0xb6,0x2b,0x73,0xcd,0x62,0xbd,0xa8,0x… in xsalsa20_test()
77 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
H A Dxsalsa20_setup.c55 const unsigned char *nonce, unsigned long noncelen, in xsalsa20_setup() argument
66 LTC_ARGCHK(nonce != NULL); in xsalsa20_setup()
84 LOAD32L(x[ 6], nonce + 0); in xsalsa20_setup()
85 LOAD32L(x[ 7], nonce + 4); in xsalsa20_setup()
86 LOAD32L(x[ 8], nonce + 8); in xsalsa20_setup()
87 LOAD32L(x[ 9], nonce + 12); in xsalsa20_setup()
110 LOAD32L(st->input[ 6], &(nonce[16]) + 0); in xsalsa20_setup()
111 LOAD32L(st->input[ 7], &(nonce[16]) + 4); in xsalsa20_setup()
H A Dxsalsa20_memory.c21 const unsigned char *nonce, unsigned long noncelen, in xsalsa20_memory() argument
27 if ((err = xsalsa20_setup(&st, key, keylen, nonce, noncelen, rounds)) != CRYPT_OK) goto WIPE_KEY; in xsalsa20_memory()
/optee_os/lib/libmbedtls/mbedtls/library/
H A Dpsa_crypto_aead.c121 const uint8_t *nonce, size_t nonce_length, in mbedtls_psa_aead_encrypt() argument
150 nonce, nonce_length, in mbedtls_psa_aead_encrypt()
163 nonce, nonce_length, in mbedtls_psa_aead_encrypt()
178 nonce, in mbedtls_psa_aead_encrypt()
188 (void) nonce; in mbedtls_psa_aead_encrypt()
233 const uint8_t *nonce, size_t nonce_length, in mbedtls_psa_aead_decrypt() argument
261 nonce, nonce_length, in mbedtls_psa_aead_decrypt()
273 nonce, nonce_length, in mbedtls_psa_aead_decrypt()
289 nonce, in mbedtls_psa_aead_decrypt()
298 (void) nonce; in mbedtls_psa_aead_decrypt()
[all …]
H A Dchachapoly.c105 const unsigned char nonce[12], in mbedtls_chachapoly_starts()
112 ret = mbedtls_chacha20_starts(&ctx->chacha20_ctx, nonce, 0U); in mbedtls_chachapoly_starts()
247 const unsigned char nonce[12], in chachapoly_crypt_and_tag()
256 ret = mbedtls_chachapoly_starts(ctx, nonce, mode); in chachapoly_crypt_and_tag()
279 const unsigned char nonce[12], in mbedtls_chachapoly_encrypt_and_tag()
287 length, nonce, aad, aad_len, in mbedtls_chachapoly_encrypt_and_tag()
293 const unsigned char nonce[12], in mbedtls_chachapoly_auth_decrypt()
305 MBEDTLS_CHACHAPOLY_DECRYPT, length, nonce, in mbedtls_chachapoly_auth_decrypt()
H A Dpsa_crypto_aead.h71 const uint8_t *nonce, size_t nonce_length,
134 const uint8_t *nonce, size_t nonce_length,
255 const uint8_t *nonce,
H A Dchacha20.c182 const unsigned char nonce[12], in mbedtls_chacha20_starts()
189 ctx->state[13] = MBEDTLS_GET_UINT32_LE(nonce, 0); in mbedtls_chacha20_starts()
190 ctx->state[14] = MBEDTLS_GET_UINT32_LE(nonce, 4); in mbedtls_chacha20_starts()
191 ctx->state[15] = MBEDTLS_GET_UINT32_LE(nonce, 8); in mbedtls_chacha20_starts()
246 const unsigned char nonce[12], in mbedtls_chacha20_crypt()
262 ret = mbedtls_chacha20_starts(&ctx, nonce, counter); in mbedtls_chacha20_crypt()
/optee_os/core/lib/libtomcrypt/src/encauth/ocb/
H A Docb_encrypt_authenticate_memory.c27 const unsigned char *nonce, in ocb_encrypt_authenticate_memory() argument
36 LTC_ARGCHK(nonce != NULL); in ocb_encrypt_authenticate_memory()
48 if ((err = ocb_init(ocb, cipher, key, keylen, nonce)) != CRYPT_OK) { in ocb_encrypt_authenticate_memory()
H A Docb_decrypt_verify_memory.c28 const unsigned char *nonce, in ocb_decrypt_verify_memory() argument
38 LTC_ARGCHK(nonce != NULL); in ocb_decrypt_verify_memory()
50 if ((err = ocb_init(ocb, cipher, key, keylen, nonce)) != CRYPT_OK) { in ocb_decrypt_verify_memory()
H A Docb_test.c23 unsigned char key[16], nonce[16], pt[34], ct[34], tag[16]; in ocb_test()
173 tests[x].nonce, tests[x].pt, tests[x].ptlen, outct, outtag, &len)) != CRYPT_OK) { in ocb_test()
182 … if ((err = ocb_decrypt_verify_memory(idx, tests[x].key, 16, tests[x].nonce, outct, tests[x].ptlen, in ocb_test()
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
H A Dchachapoly.h155 const unsigned char nonce[12],
287 const unsigned char nonce[12],
321 const unsigned char nonce[12],
H A Dchacha20.h116 const unsigned char nonce[12],
182 const unsigned char nonce[12],
/optee_os/core/drivers/crypto/caam/ae/
H A Dcaam_ae_ccm.c61 if (dinit->nonce.length > AES_CCM_MAX_NONCE_LEN) in caam_ae_ccm_init_ctx()
87 q = AES_CCM_MAX_NONCE_LEN - dinit->nonce.length; in caam_ae_ccm_init_ctx()
95 memcpy(&b0[1], dinit->nonce.data, dinit->nonce.length); in caam_ae_ccm_init_ctx()
102 for (i = AES_CCM_MAX_NONCE_LEN; i >= dinit->nonce.length + 1; i--) { in caam_ae_ccm_init_ctx()
136 memcpy(&ctr0[1], &b0[1], dinit->nonce.length); in caam_ae_ccm_init_ctx()
H A Dcaam_ae.c139 caam_free_buf(&caam_ctx->nonce); in caam_ae_free()
279 caam_free_buf(&caam_ctx->nonce); in caam_ae_final()
322 caam_free_buf(&dst->nonce); in caam_ae_copy_state()
358 if (src->nonce.length) in caam_ae_copy_state()
359 caam_cpy_buf(&dst->nonce, src->nonce.data, in caam_ae_copy_state()
360 src->nonce.length); in caam_ae_copy_state()
508 if (caam_ctx->nonce.data) { in caam_ae_do_oneshot()
512 caam_ctx->nonce.length)); in caam_ae_do_oneshot()
516 caam_ctx->nonce.length)); in caam_ae_do_oneshot()
517 caam_desc_add_ptr(desc, caam_ctx->nonce.paddr); in caam_ae_do_oneshot()
[all …]
H A Dcaam_ae_gcm.c114 caam_ctx->nonce.length == AES_GCM_DEFAULT_NONCE_LEN) in caam_ae_do_block_gcm()
307 if (dinit->nonce.data && dinit->nonce.length) { in caam_ae_initialize_gcm()
308 retstatus = caam_cpy_buf(&caam_ctx->nonce, dinit->nonce.data, in caam_ae_initialize_gcm()
309 dinit->nonce.length); in caam_ae_initialize_gcm()
/optee_os/core/lib/libtomcrypt/src/encauth/ccm/
H A Dccm_add_nonce.c15 const unsigned char *nonce, unsigned long noncelen) in ccm_add_nonce() argument
21 LTC_ARGCHK(nonce != NULL); in ccm_add_nonce()
45 ccm->PAD[x++] = nonce[y]; in ccm_add_nonce()
95 ccm->ctr[x++] = nonce[y]; in ccm_add_nonce()
H A Dccm_test.c19 unsigned char nonce[16]; in ccm_test()
135 tests[x].nonce, tests[x].noncelen, in ccm_test()
146 tests[x].nonce, tests[x].noncelen, in ccm_test()
157 if ((err = ccm_add_nonce(&ccm, tests[x].nonce, tests[x].noncelen)) != CRYPT_OK) { in ccm_test()
184 tests[x].nonce, tests[x].noncelen, in ccm_test()
195 if ((err = ccm_add_nonce(&ccm, tests[x].nonce, tests[x].noncelen)) != CRYPT_OK) { in ccm_test()
221 tests[x].nonce, tests[x].noncelen, in ccm_test()
/optee_os/core/lib/libtomcrypt/src/encauth/ocb3/
H A Docb3_init.c12 static void s_ocb3_int_calc_offset_zero(ocb3_state *ocb, const unsigned char *nonce, unsigned long … in s_ocb3_int_calc_offset_zero() argument
23 iNonce[x] = nonce[noncelen-y-1]; in s_ocb3_int_calc_offset_zero()
84 const unsigned char *nonce, unsigned long noncelen, in ocb3_init() argument
92 LTC_ARGCHK(nonce != NULL); in ocb3_init()
169 s_ocb3_int_calc_offset_zero(ocb, nonce, noncelen, taglen); in ocb3_init()
H A Docb3_test.c23 unsigned char nonce[12] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B }; in ocb3_test()
216 nonce, sizeof(nonce), in ocb3_test()
230 nonce, sizeof(nonce), in ocb3_test()
H A Docb3_encrypt_authenticate_memory.c30 const unsigned char *nonce, unsigned long noncelen, in ocb3_encrypt_authenticate_memory() argument
47 if ((err = ocb3_init(ocb, cipher, key, keylen, nonce, noncelen, *taglen)) != CRYPT_OK) { in ocb3_encrypt_authenticate_memory()
/optee_os/core/drivers/crypto/stm32/
H A Dauthenc.c59 if (dinit->nonce.length == 12) { in stm32_ae_gcm_generate_iv()
60 memcpy(iv, dinit->nonce.data, dinit->nonce.length); in stm32_ae_gcm_generate_iv()
85 data_out = malloc(dinit->nonce.length); in stm32_ae_gcm_generate_iv()
89 res = stm32_cryp_update_load(&ctx, dinit->nonce.data, data_out, in stm32_ae_gcm_generate_iv()
90 dinit->nonce.length); in stm32_ae_gcm_generate_iv()
145 size_t l = 15 - dinit->nonce.length; in stm32_ae_ccm_generate_b0()
159 memcpy(b0 + 1, dinit->nonce.data, dinit->nonce.length); in stm32_ae_ccm_generate_b0()
/optee_os/core/lib/libtomcrypt/src/encauth/eax/
H A Deax_test.c28 nonce[MAXBLOCKSIZE], in eax_test()
222 tests[x].nonce, tests[x].noncelen, tests[x].header, tests[x].headerlen, in eax_test()
233 tests[x].nonce, tests[x].noncelen, tests[x].header, tests[x].headerlen, in eax_test()
H A Deax_init.c26 const unsigned char *nonce, unsigned long noncelen, in eax_init() argument
37 LTC_ARGCHK(nonce != NULL); in eax_init()
72 if ((err = omac_process(omac, nonce, noncelen)) != CRYPT_OK) { in eax_init()
H A Deax_encrypt_authenticate_memory.c30 const unsigned char *nonce, unsigned long noncelen, in eax_encrypt_authenticate_memory() argument
47 if ((err = eax_init(eax, cipher, key, keylen, nonce, noncelen, header, headerlen)) != CRYPT_OK) { in eax_encrypt_authenticate_memory()
/optee_os/core/lib/libtomcrypt/src/headers/
H A Dtomcrypt_mac.h263 const unsigned char *nonce, unsigned long noncelen,
273 const unsigned char *nonce, unsigned long noncelen,
281 const unsigned char *nonce, unsigned long noncelen,
307 const unsigned char *key, unsigned long keylen, const unsigned char *nonce);
324 const unsigned char *nonce,
331 const unsigned char *nonce,
373 const unsigned char *nonce, unsigned long noncelen,
385 const unsigned char *nonce, unsigned long noncelen,
393 const unsigned char *nonce, unsigned long noncelen,
436 const unsigned char *nonce, unsigned long noncelen);
[all …]

123