Home
last modified time | relevance | path

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

123

/optee_os/core/lib/libtomcrypt/src/stream/salsa20/
A Dxsalsa20_test.c43 …const unsigned char nonce[] = {0x69,0x69,0x6e,0xe9,0x55,0xb6,0x2b,0x73,0xcd,0x62,0xbd,0xa8,0x75,0x… in xsalsa20_test()
52 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
56 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
64 …if ((err = xsalsa20_memory(key, sizeof(key), 20, nonce, sizeof(nonce), msg, msglen, ciphertext)) … in xsalsa20_test()
65 …if ((err = xsalsa20_memory(key, sizeof(key), 20, nonce, sizeof(nonce), ciphertext, msglen, msg2)) … in xsalsa20_test()
75 …const unsigned char nonce[] = {0x69,0x69,0x6e,0xe9,0x55,0xb6,0x2b,0x73,0xcd,0x62,0xbd,0xa8,0x… in xsalsa20_test()
84 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
A Dxsalsa20_setup.c62 const unsigned char *nonce, unsigned long noncelen, in xsalsa20_setup() argument
73 LTC_ARGCHK(nonce != NULL); in xsalsa20_setup()
91 LOAD32L(x[ 6], nonce + 0); in xsalsa20_setup()
92 LOAD32L(x[ 7], nonce + 4); in xsalsa20_setup()
93 LOAD32L(x[ 8], nonce + 8); in xsalsa20_setup()
94 LOAD32L(x[ 9], nonce + 12); in xsalsa20_setup()
117 LOAD32L(st->input[ 6], &(nonce[16]) + 0); in xsalsa20_setup()
118 LOAD32L(st->input[ 7], &(nonce[16]) + 4); in xsalsa20_setup()
A Dxsalsa20_memory.c28 const unsigned char *nonce, unsigned long noncelen, in xsalsa20_memory() argument
34 if ((err = xsalsa20_setup(&st, key, keylen, nonce, noncelen, rounds)) != CRYPT_OK) goto WIPE_KEY; in xsalsa20_memory()
/optee_os/lib/libmbedtls/mbedtls/library/
A Dchachapoly.c130 const unsigned char nonce[12], in mbedtls_chachapoly_starts()
136 CHACHAPOLY_VALIDATE_RET( nonce != NULL ); in mbedtls_chachapoly_starts()
139 ret = mbedtls_chacha20_starts( &ctx->chacha20_ctx, nonce, 0U ); in mbedtls_chachapoly_starts()
295 const unsigned char nonce[12], in chachapoly_crypt_and_tag()
304 ret = mbedtls_chachapoly_starts( ctx, nonce, mode ); in chachapoly_crypt_and_tag()
324 const unsigned char nonce[12], in mbedtls_chachapoly_encrypt_and_tag()
332 CHACHAPOLY_VALIDATE_RET( nonce != NULL ); in mbedtls_chachapoly_encrypt_and_tag()
339 length, nonce, aad, aad_len, in mbedtls_chachapoly_encrypt_and_tag()
345 const unsigned char nonce[12], in mbedtls_chachapoly_auth_decrypt()
357 CHACHAPOLY_VALIDATE_RET( nonce != NULL ); in mbedtls_chachapoly_auth_decrypt()
[all …]
A Dchacha20.c228 const unsigned char nonce[12], in mbedtls_chacha20_starts()
232 CHACHA20_VALIDATE_RET( nonce != NULL ); in mbedtls_chacha20_starts()
238 ctx->state[13] = BYTES_TO_U32_LE( nonce, 0 ); in mbedtls_chacha20_starts()
239 ctx->state[14] = BYTES_TO_U32_LE( nonce, 4 ); in mbedtls_chacha20_starts()
240 ctx->state[15] = BYTES_TO_U32_LE( nonce, 8 ); in mbedtls_chacha20_starts()
316 const unsigned char nonce[12], in mbedtls_chacha20_crypt()
326 CHACHA20_VALIDATE_RET( nonce != NULL ); in mbedtls_chacha20_crypt()
336 ret = mbedtls_chacha20_starts( &ctx, nonce, counter ); in mbedtls_chacha20_crypt()
/optee_os/core/lib/libtomcrypt/src/encauth/ccm/
A Dccm_test.c26 unsigned char nonce[16]; in ccm_test()
142 tests[x].nonce, tests[x].noncelen, in ccm_test()
153 tests[x].nonce, tests[x].noncelen, in ccm_test()
164 if ((err = ccm_add_nonce(&ccm, tests[x].nonce, tests[x].noncelen)) != CRYPT_OK) { in ccm_test()
191 tests[x].nonce, tests[x].noncelen, in ccm_test()
202 if ((err = ccm_add_nonce(&ccm, tests[x].nonce, tests[x].noncelen)) != CRYPT_OK) { in ccm_test()
228 tests[x].nonce, tests[x].noncelen, in ccm_test()
A Dccm_add_nonce.c22 const unsigned char *nonce, unsigned long noncelen) in ccm_add_nonce() argument
28 LTC_ARGCHK(nonce != NULL); in ccm_add_nonce()
49 ccm->PAD[x++] = nonce[y]; in ccm_add_nonce()
99 ccm->ctr[x++] = nonce[y]; in ccm_add_nonce()
/optee_os/core/lib/libtomcrypt/src/encauth/ocb/
A Docb_encrypt_authenticate_memory.c34 const unsigned char *nonce, in ocb_encrypt_authenticate_memory() argument
43 LTC_ARGCHK(nonce != NULL); in ocb_encrypt_authenticate_memory()
55 if ((err = ocb_init(ocb, cipher, key, keylen, nonce)) != CRYPT_OK) { in ocb_encrypt_authenticate_memory()
A Docb_decrypt_verify_memory.c35 const unsigned char *nonce, in ocb_decrypt_verify_memory() argument
45 LTC_ARGCHK(nonce != NULL); in ocb_decrypt_verify_memory()
57 if ((err = ocb_init(ocb, cipher, key, keylen, nonce)) != CRYPT_OK) { in ocb_decrypt_verify_memory()
A Docb_test.c30 unsigned char key[16], nonce[16], pt[34], ct[34], tag[16]; in ocb_test()
180 tests[x].nonce, tests[x].pt, tests[x].ptlen, outct, outtag, &len)) != CRYPT_OK) { in ocb_test()
189 … if ((err = ocb_decrypt_verify_memory(idx, tests[x].key, 16, tests[x].nonce, outct, tests[x].ptlen, in ocb_test()
/optee_os/out/arm/export-ta_arm32/include/mbedtls/
A Dchachapoly.h170 const unsigned char nonce[12],
302 const unsigned char nonce[12],
336 const unsigned char nonce[12],
A Dchacha20.h139 const unsigned char nonce[12],
205 const unsigned char nonce[12],
/optee_os/out/arm/export-ta_arm64/host_include/mbedtls/
A Dchachapoly.h170 const unsigned char nonce[12],
302 const unsigned char nonce[12],
336 const unsigned char nonce[12],
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
A Dchachapoly.h170 const unsigned char nonce[12],
302 const unsigned char nonce[12],
336 const unsigned char nonce[12],
/optee_os/out/arm/export-ta_arm64/include/mbedtls/
A Dchachapoly.h170 const unsigned char nonce[12],
302 const unsigned char nonce[12],
336 const unsigned char nonce[12],
A Dchacha20.h139 const unsigned char nonce[12],
205 const unsigned char nonce[12],
/optee_os/out/arm/export-ta_arm32/host_include/mbedtls/
A Dchachapoly.h170 const unsigned char nonce[12],
302 const unsigned char nonce[12],
336 const unsigned char nonce[12],
/optee_os/core/drivers/crypto/stm32/
A Dauthenc.c63 if (dinit->nonce.length == 12) { in stm32_ae_gcm_generate_iv()
64 memcpy(iv, dinit->nonce.data, dinit->nonce.length); in stm32_ae_gcm_generate_iv()
89 data_out = malloc(dinit->nonce.length); in stm32_ae_gcm_generate_iv()
93 res = stm32_cryp_update_load(&ctx, dinit->nonce.data, data_out, in stm32_ae_gcm_generate_iv()
94 dinit->nonce.length); in stm32_ae_gcm_generate_iv()
149 size_t l = 15 - dinit->nonce.length; in stm32_ae_ccm_generate_b0()
163 memcpy(b0 + 1, dinit->nonce.data, dinit->nonce.length); in stm32_ae_ccm_generate_b0()
/optee_os/core/lib/libtomcrypt/src/encauth/ocb3/
A Docb3_init.c19 static void _ocb3_int_calc_offset_zero(ocb3_state *ocb, const unsigned char *nonce, unsigned long n… in _ocb3_int_calc_offset_zero() argument
30 iNonce[x] = nonce[noncelen-y-1]; in _ocb3_int_calc_offset_zero()
91 const unsigned char *nonce, unsigned long noncelen, in ocb3_init() argument
99 LTC_ARGCHK(nonce != NULL); in ocb3_init()
176 _ocb3_int_calc_offset_zero(ocb, nonce, noncelen, taglen); in ocb3_init()
A Docb3_test.c30 unsigned char nonce[12] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B }; in ocb3_test()
223 nonce, sizeof(nonce), in ocb3_test()
237 nonce, sizeof(nonce), in ocb3_test()
/optee_os/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_mac.h257 const unsigned char *nonce, unsigned long noncelen,
267 const unsigned char *nonce, unsigned long noncelen,
275 const unsigned char *nonce, unsigned long noncelen,
301 const unsigned char *key, unsigned long keylen, const unsigned char *nonce);
318 const unsigned char *nonce,
325 const unsigned char *nonce,
367 const unsigned char *nonce, unsigned long noncelen,
379 const unsigned char *nonce, unsigned long noncelen,
387 const unsigned char *nonce, unsigned long noncelen,
428 const unsigned char *nonce, unsigned long noncelen);
[all …]
/optee_os/core/crypto/
A Daes-gcm.c71 TEE_OperationMode mode, const void *nonce, in __gcm_init() argument
85 memcpy(state->ctr, nonce, nonce_len); in __gcm_init()
88 ghash_update_pad_zero(state, nonce, nonce_len); in __gcm_init()
126 size_t key_len, const void *nonce, in internal_aes_gcm_init() argument
137 return __gcm_init(&ctx->state, ek, mode, nonce, nonce_len, tag_len); in internal_aes_gcm_init()
371 const void *nonce, size_t nonce_len, in internal_aes_gcm_enc() argument
379 res = __gcm_init(&state, enc_key, TEE_MODE_ENCRYPT, nonce, nonce_len, in internal_aes_gcm_enc()
394 const void *nonce, size_t nonce_len, in internal_aes_gcm_dec() argument
402 res = __gcm_init(&state, enc_key, TEE_MODE_DECRYPT, nonce, nonce_len, in internal_aes_gcm_dec()
463 const uint8_t *nonce, size_t nonce_len, in aes_gcm_init() argument
[all …]
/optee_os/core/drivers/crypto/crypto_api/authenc/
A Dauthenc.c77 size_t key_len, const uint8_t *nonce, in authenc_init() argument
84 if ((!key && key_len) || (!nonce && nonce_len)) { in authenc_init()
87 CRYPTO_TRACE("nonce @%p-%zu bytes", nonce, nonce_len); in authenc_init()
97 .nonce.data = (uint8_t *)nonce, in authenc_init()
98 .nonce.length = nonce_len, in authenc_init()
/optee_os/core/lib/libtomcrypt/src/encauth/eax/
A Deax_test.c35 nonce[MAXBLOCKSIZE], in eax_test()
229 tests[x].nonce, tests[x].noncelen, tests[x].header, tests[x].headerlen, in eax_test()
240 tests[x].nonce, tests[x].noncelen, tests[x].header, tests[x].headerlen, in eax_test()
A Deax_init.c33 const unsigned char *nonce, unsigned long noncelen, in eax_init() argument
44 LTC_ARGCHK(nonce != NULL); in eax_init()
79 if ((err = omac_process(omac, nonce, noncelen)) != CRYPT_OK) { in eax_init()

Completed in 35 milliseconds

123