/openssl/crypto/chacha/ |
H A D | chacha_ppc.c | 19 const unsigned int counter[4]); 22 const unsigned int counter[4]); 25 const unsigned int counter[4]); 28 const unsigned int counter[4]); 31 const unsigned int counter[4]) in ChaCha20_ctr32() 35 ? ChaCha20_ctr32_vsx_p10(out, inp, len, key, counter) : in ChaCha20_ctr32() 38 ? ChaCha20_ctr32_vsx(out, inp, len, key, counter) in ChaCha20_ctr32() 40 ? ChaCha20_ctr32_vmx(out, inp, len, key, counter) in ChaCha20_ctr32() 41 : ChaCha20_ctr32_int(out, inp, len, key, counter); in ChaCha20_ctr32()
|
H A D | chacha_riscv.c | 45 const unsigned int counter[4]); 49 const unsigned int counter[4]); 52 const unsigned int key[8], const unsigned int counter[4]) in ChaCha20_ctr32() 56 ChaCha20_ctr32_v_zbb_zvkb(out, inp, len, key, counter); in ChaCha20_ctr32() 58 ChaCha20_ctr32_v_zbb(out, inp, len, key, counter); in ChaCha20_ctr32() 61 ChaCha20_ctr32_c(out, inp, len, key, counter); in ChaCha20_ctr32()
|
H A D | chacha_enc.c | 95 const unsigned int key[8], const unsigned int counter[4]) in ChaCha20_ctr32_c() 98 const unsigned int key[8], const unsigned int counter[4]) in ChaCha20_ctr32_c() 128 input[12] = counter[0]; in ChaCha20_ctr32_c() 129 input[13] = counter[1]; in ChaCha20_ctr32_c() 130 input[14] = counter[2]; in ChaCha20_ctr32_c() 131 input[15] = counter[3]; in ChaCha20_ctr32_c()
|
/openssl/crypto/dh/ |
H A D | dh_asn1.c | 63 BIGNUM *counter; member 76 ASN1_SIMPLE(int_dhvparams, counter, BIGNUM) 119 size_t counter = (size_t)BN_get_word(dhx->vparams->counter); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() local 122 counter); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() 124 BN_free(dhx->vparams->counter); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() 143 int counter; in i2d_DHxparams() local 151 if (counter != -1 && seed.data != NULL && seed.length > 0) { in i2d_DHxparams() 154 dhv.counter = BN_new(); in i2d_DHxparams() 155 if (dhv.counter == NULL) in i2d_DHxparams() 157 if (!BN_set_word(dhv.counter, (BN_ULONG)counter)) in i2d_DHxparams() [all …]
|
/openssl/providers/implementations/ciphers/ |
H A D | cipher_chacha20_hw.c | 35 ctx->counter[i / 4] = CHACHA_U8TOU32(bctx->oiv + i); in chacha20_initiv() 60 ctx->counter[0]++; in chacha20_cipher() 61 if (ctx->counter[0] == 0) in chacha20_cipher() 62 ctx->counter[1]++; in chacha20_cipher() 68 ctr32 = ctx->counter[0]; in chacha20_cipher() 92 ChaCha20_ctr32(out, in, blocks, ctx->key.d, ctx->counter); in chacha20_cipher() 97 ctx->counter[0] = ctr32; in chacha20_cipher() 98 if (ctr32 == 0) ctx->counter[1]++; in chacha20_cipher() 104 ctx->key.d, ctx->counter); in chacha20_cipher()
|
H A D | cipher_aes_gcm_siv_hw.c | 29 uint32_t counter = 0x0; in aes_gcm_siv_initkey() local 32 uint32_t counter; in aes_gcm_siv_initkey() member 65 data.counter = counter; in aes_gcm_siv_initkey() 67 data.counter = GSWAP4(counter); in aes_gcm_siv_initkey() 74 counter++; in aes_gcm_siv_initkey() 80 data.counter = counter; in aes_gcm_siv_initkey() 82 data.counter = GSWAP4(counter); in aes_gcm_siv_initkey() 89 counter++; in aes_gcm_siv_initkey() 342 uint32_t counter; in aes_gcm_siv_ctr32() local 352 counter = GSWAP4(block.x32[0]); in aes_gcm_siv_ctr32() [all …]
|
H A D | cipher_chacha20_poly1305_hw.c | 37 ctx->chacha.counter[1] = ctx->nonce[0]; in chacha_poly1305_tls_init() 38 ctx->chacha.counter[2] = ctx->nonce[1] ^ CHACHA_U8TOU32(aad); in chacha_poly1305_tls_init() 98 ctx->nonce[0] = ctx->chacha.counter[1]; in chacha20_poly1305_initiv() 99 ctx->nonce[1] = ctx->chacha.counter[2]; in chacha20_poly1305_initiv() 100 ctx->nonce[2] = ctx->chacha.counter[3]; in chacha20_poly1305_initiv() 135 ctx->chacha.counter[0] = 0; in chacha20_poly1305_tls_cipher() 160 ctx->chacha.counter[0] = 0; in chacha20_poly1305_tls_cipher() 192 ctx->chacha.counter[0] = 0; in chacha20_poly1305_tls_cipher() 196 ctx->chacha.counter[0] = 1; in chacha20_poly1305_tls_cipher() 288 ctx->chacha.counter[0] = 0; in chacha20_poly1305_aead_cipher() [all …]
|
H A D | cipher_chacha20.h | 19 unsigned int counter[CHACHA_CTR_SIZE / 4]; member
|
/openssl/crypto/evp/ |
H A D | e_chacha20_poly1305.c | 76 key->counter[0]++; in chacha_cipher() 77 if (key->counter[0] == 0) in chacha_cipher() 78 key->counter[1]++; in chacha_cipher() 84 ctr32 = key->counter[0]; in chacha_cipher() 112 key->counter[0] = ctr32; in chacha_cipher() 230 actx->key.counter[0] = 0; in chacha20_poly1305_tls_cipher() 256 actx->key.counter[0] = 0; in chacha20_poly1305_tls_cipher() 288 actx->key.counter[0] = 0; in chacha20_poly1305_tls_cipher() 292 actx->key.counter[0] = 1; in chacha20_poly1305_tls_cipher() 375 actx->key.counter[0] = 0; in chacha20_poly1305_cipher() [all …]
|
/openssl/crypto/modes/ |
H A D | ctr128.c | 27 static void ctr128_inc(unsigned char *counter) in ctr128_inc() argument 33 c += counter[n]; in ctr128_inc() 34 counter[n] = (u8)c; in ctr128_inc() 40 static void ctr128_inc_aligned(unsigned char *counter) in ctr128_inc_aligned() argument 45 if (IS_LITTLE_ENDIAN || ((size_t)counter % sizeof(size_t)) != 0) { in ctr128_inc_aligned() 46 ctr128_inc(counter); in ctr128_inc_aligned() 50 data = (size_t *)counter; in ctr128_inc_aligned() 138 static void ctr96_inc(unsigned char *counter) in ctr96_inc() argument 144 c += counter[n]; in ctr96_inc() 145 counter[n] = (u8)c; in ctr96_inc()
|
H A D | ccm128.c | 121 static void ctr64_inc(unsigned char *counter) in ctr64_inc() argument 126 counter += 8; in ctr64_inc() 129 c = counter[n]; in ctr64_inc() 131 counter[n] = c; in ctr64_inc() 296 static void ctr64_add(unsigned char *counter, size_t inc) in ctr64_add() argument 300 counter += 8; in ctr64_add() 303 val += counter[n] + (inc & 0xff); in ctr64_add() 304 counter[n] = (unsigned char)val; in ctr64_add()
|
/openssl/crypto/ffc/ |
H A D | ffc_params_generate.c | 138 int counter = 1; in generate_canonical_g() local 156 for (counter = 1; counter <= 0xFFFF; ++counter) { in generate_canonical_g() 167 md[2] = (unsigned char)(counter & 0xff); in generate_canonical_g() 296 *counter = i; in generate_p() 663 counter = 4 * L - 1; in ossl_ffc_params_FIPS186_4_gen_verify() 667 if (params->pcounter > counter) { in ossl_ffc_params_FIPS186_4_gen_verify() 671 counter = params->pcounter; in ossl_ffc_params_FIPS186_4_gen_verify() 948 counter = 4 * L - 1; /* Was 4096 */ in ossl_ffc_params_FIPS186_2_gen_verify() 951 if (params->pcounter > counter) { in ossl_ffc_params_FIPS186_2_gen_verify() 955 counter = params->pcounter; in ossl_ffc_params_FIPS186_2_gen_verify() [all …]
|
/openssl/crypto/bn/ |
H A D | bn_blind.c | 22 int counter; member 70 ret->counter = -1; in BN_BLINDING_new() 100 if (b->counter == -1) in BN_BLINDING_update() 101 b->counter = 0; in BN_BLINDING_update() 103 if (++b->counter == BN_BLINDING_COUNTER && b->e != NULL && in BN_BLINDING_update() 122 if (b->counter == BN_BLINDING_COUNTER) in BN_BLINDING_update() 123 b->counter = 0; in BN_BLINDING_update() 143 if (b->counter == -1) in BN_BLINDING_convert_ex() 145 b->counter = 0; in BN_BLINDING_convert_ex()
|
/openssl/providers/implementations/kdfs/ |
H A D | sskdf.c | 124 size_t counter, out_len, len = derived_key_len; in SSKDF_hash_kdm() local 148 for (counter = 1;; counter++) { in SSKDF_hash_kdm() 149 c[0] = (unsigned char)((counter >> 24) & 0xff); in SSKDF_hash_kdm() 150 c[1] = (unsigned char)((counter >> 16) & 0xff); in SSKDF_hash_kdm() 151 c[2] = (unsigned char)((counter >> 8) & 0xff); in SSKDF_hash_kdm() 152 c[3] = (unsigned char)(counter & 0xff); in SSKDF_hash_kdm() 244 size_t counter, out_len, len; in SSKDF_mac_kdm() local 270 for (counter = 1;; counter++) { in SSKDF_mac_kdm() 271 c[0] = (unsigned char)((counter >> 24) & 0xff); in SSKDF_mac_kdm() 273 c[2] = (unsigned char)((counter >> 8) & 0xff); in SSKDF_mac_kdm() [all …]
|
H A D | x942kdf.c | 275 size_t counter, out_len, len = derived_key_len; in x942kdf_hash_kdm() local 301 for (counter = 1;; counter++) { in x942kdf_hash_kdm() 303 ctr[0] = (unsigned char)((counter >> 24) & 0xff); in x942kdf_hash_kdm() 304 ctr[1] = (unsigned char)((counter >> 16) & 0xff); in x942kdf_hash_kdm() 305 ctr[2] = (unsigned char)((counter >> 8) & 0xff); in x942kdf_hash_kdm() 306 ctr[3] = (unsigned char)(counter & 0xff); in x942kdf_hash_kdm()
|
H A D | kbkdf.c | 217 uint32_t counter, i; in derive() local 234 for (counter = 1; written < ko_len; counter++) { in derive() 235 i = be32(counter); in derive()
|
/openssl/include/crypto/ |
H A D | chacha.h | 29 const unsigned int counter[4]); 33 const unsigned int key[8], const unsigned int counter[4]);
|
/openssl/crypto/chacha/asm/ |
H A D | chacha-ia64.pl | 24 my ($out,$inp,$len,$key,$counter) = map("r$_",(32..36)); 52 ADDP $counter=0,$counter 67 add @k[15]=4,$counter };; 71 { .mmi; ld4 @k[12]=[$counter],8 74 { .mmi; ld4 @k[14]=[$counter]
|
H A D | chacha-armv8-sve.pl | 35 my ($counter) = ("x6"); 218 mov $counter,#10 225 sub $counter,$counter,1 226 cbnz $counter,10b 232 mov $counter,#10 239 sub $counter,$counter,1 240 cbnz $counter,10b 334 my ($tmp,$tmpw) = ($counter,$counter_w); 364 my ($tmp,$tmpw) = ($counter,$counter_w);
|
H A D | chacha-x86_64.pl | 518 mov \$10,$counter # reuse $counter 528 mov \$10,$counter 546 &dec ($counter); 585 xor $counter,$counter 590 lea 1($counter),$counter 698 mov \$10,$counter # reuse $counter 720 &dec ($counter); 2545 mov \$10,$counter # reuse $counter 2686 lea 1($counter),$counter 2757 mov \$10,$counter # reuse $counter [all …]
|
H A D | chacha-loongarch64.pl | 188 ld.w $s8,$counter,0 214 ld.w @x[13],$counter,4*1 215 ld.w @x[14],$counter,4*2 216 ld.w @x[15],$counter,4*3 264 ld.w $t8,$counter,4*1 265 ld.w $a7,$counter,4*2 266 ld.w $a6,$counter,4*3 468 ld.w $t4,$counter,0 494 vldrepl.w @x[13],$counter,4*1 495 vldrepl.w @x[14],$counter,4*2 [all …]
|
/openssl/doc/man3/ |
H A D | EVP_chacha20.pod | 25 The first 64 bits consists of a counter in little-endian order followed by a 64 30 With an initial counter of 42 (2a in hex) would be expressed as: 51 uses a 32 bit counter and a 96 bit nonce for the IV.
|
H A D | DSA_generate_parameters.pod | 45 *B<counter_ret> and a counter used for finding a generator in 72 i is the loop counter (starting at 0). 82 B<BN_GENCB_call(cb, 0, counter)> is called. 91 i is the loop counter (starting at 0).
|
/openssl/doc/man7/ |
H A D | EVP_KDF-KB.pod | 29 choices are "counter" and "feedback". "counter" is the default, and will be 50 The seed parameter is unused in counter mode. 65 Set the fixed value 'r', indicating the length of the counter in bits. 114 Note that currently OpenSSL only implements counter and feedback modes. Other
|
/openssl/providers/implementations/rands/ |
H A D | drbg_hash.c | 339 unsigned char counter[4]; in drbg_hash_generate() local 342 counter[0] = (unsigned char)((reseed_counter >> 24) & 0xff); in drbg_hash_generate() 343 counter[1] = (unsigned char)((reseed_counter >> 16) & 0xff); in drbg_hash_generate() 344 counter[2] = (unsigned char)((reseed_counter >> 8) & 0xff); in drbg_hash_generate() 345 counter[3] = (unsigned char)(reseed_counter & 0xff); in drbg_hash_generate() 360 && add_bytes(drbg, hash->V, counter, 4); in drbg_hash_generate()
|