/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/salsa20/ |
A D | xsalsa20_test.c | 36 …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()
|
A D | xsalsa20_setup.c | 55 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()
|
A D | xsalsa20_memory.c | 21 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-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | chachapoly.c | 130 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() 281 const unsigned char nonce[12], in chachapoly_crypt_and_tag() 290 ret = mbedtls_chachapoly_starts( ctx, nonce, mode ); in chachapoly_crypt_and_tag() 310 const unsigned char nonce[12], in mbedtls_chachapoly_encrypt_and_tag() 318 CHACHAPOLY_VALIDATE_RET( nonce != NULL ); in mbedtls_chachapoly_encrypt_and_tag() 325 length, nonce, aad, aad_len, in mbedtls_chachapoly_encrypt_and_tag() 331 const unsigned char nonce[12], in mbedtls_chachapoly_auth_decrypt() 343 CHACHAPOLY_VALIDATE_RET( nonce != NULL ); in mbedtls_chachapoly_auth_decrypt() [all …]
|
A D | chacha20.c | 218 const unsigned char nonce[12], in mbedtls_chacha20_starts() 222 CHACHA20_VALIDATE_RET( nonce != NULL ); in mbedtls_chacha20_starts() 228 ctx->state[13] = MBEDTLS_GET_UINT32_LE( nonce, 0 ); in mbedtls_chacha20_starts() 229 ctx->state[14] = MBEDTLS_GET_UINT32_LE( nonce, 4 ); in mbedtls_chacha20_starts() 230 ctx->state[15] = MBEDTLS_GET_UINT32_LE( nonce, 8 ); in mbedtls_chacha20_starts() 306 const unsigned char nonce[12], in mbedtls_chacha20_crypt() 316 CHACHA20_VALIDATE_RET( nonce != NULL ); in mbedtls_chacha20_crypt() 326 ret = mbedtls_chacha20_starts( &ctx, nonce, counter ); in mbedtls_chacha20_crypt()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/ocb/ |
A D | ocb_encrypt_authenticate_memory.c | 27 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()
|
A D | ocb_decrypt_verify_memory.c | 28 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()
|
A D | ocb_test.c | 23 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-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | chachapoly.h | 172 const unsigned char nonce[12], 304 const unsigned char nonce[12], 338 const unsigned char nonce[12],
|
A D | chacha20.h | 142 const unsigned char nonce[12], 208 const unsigned char nonce[12],
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/ccm/ |
A D | ccm_add_nonce.c | 15 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()
|
A D | ccm_test.c | 19 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-3.20.0/core/lib/libtomcrypt/src/encauth/ocb3/ |
A D | ocb3_init.c | 12 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()
|
A D | ocb3_encrypt_authenticate_memory.c | 30 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()
|
A D | ocb3_test.c | 23 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()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/eax/ |
A D | eax_test.c | 28 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()
|
A D | eax_encrypt_authenticate_memory.c | 30 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()
|
A D | eax_init.c | 26 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()
|
A D | eax_decrypt_verify_memory.c | 31 const unsigned char *nonce, unsigned long noncelen, in eax_decrypt_verify_memory() argument 68 if ((err = eax_init(eax, cipher, key, keylen, nonce, noncelen, header, headerlen)) != CRYPT_OK) { in eax_decrypt_verify_memory()
|
/optee_os-3.20.0/core/drivers/crypto/stm32/ |
A D | authenc.c | 63 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-3.20.0/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_mac.h | 263 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, 434 const unsigned char *nonce, unsigned long noncelen); [all …]
|
/optee_os-3.20.0/core/drivers/crypto/crypto_api/authenc/ |
A D | authenc.c | 77 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-3.20.0/core/include/crypto/ |
A D | internal_aes-gcm.h | 57 size_t key_len, const void *nonce, 76 const void *nonce, size_t nonce_len, 82 const void *nonce, size_t nonce_len,
|
/optee_os-3.20.0/core/pta/ |
A D | attestation.c | 438 res = crypto_hash_update(ctx, nonce, nonce_sz); in digest_nonce_and_hash() 472 res = digest_nonce_and_hash(digest, nonce, nonce_sz, buf); in sign_buffer() 574 uint8_t *nonce = params[1].memref.buffer; in cmd_get_ta_shdr_digest() local 590 if (!nonce || !nonce_sz) in cmd_get_ta_shdr_digest() 609 return sign_buffer(out, out_sz, nonce, nonce_sz); in cmd_get_ta_shdr_digest() 615 uint8_t *nonce = params[0].memref.buffer; in cmd_hash_ta_memory() local 630 if (!nonce || !nonce_sz) in cmd_hash_ta_memory() 660 return sign_buffer(out, out_sz, nonce, nonce_sz); in cmd_hash_ta_memory() 666 uint8_t *nonce = params[0].memref.buffer; in cmd_hash_tee_memory() local 680 if (!nonce || !nonce_sz) in cmd_hash_tee_memory() [all …]
|
/optee_os-3.20.0/core/crypto/ |
A D | aes-gcm.c | 71 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 …]
|