/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() 34 ? ChaCha20_ctr32_vsx_p10(out, inp, len, key, counter) in ChaCha20_ctr32() 36 ? ChaCha20_ctr32_vsx(out, inp, len, key, counter) in ChaCha20_ctr32() 38 ? ChaCha20_ctr32_vmx(out, inp, len, key, counter) in ChaCha20_ctr32() 39 : ChaCha20_ctr32_int(out, inp, len, key, counter); in ChaCha20_ctr32()
|
H A D | chacha_enc.c | 95 const unsigned int counter[4]) in ChaCha20_ctr32() 124 input[12] = counter[0]; in ChaCha20_ctr32() 125 input[13] = counter[1]; in ChaCha20_ctr32() 126 input[14] = counter[2]; in ChaCha20_ctr32() 127 input[15] = counter[3]; in ChaCha20_ctr32()
|
/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() 343 uint32_t counter; in aes_gcm_siv_ctr32() local 353 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() 99 ctx->nonce[0] = ctx->chacha.counter[1]; in chacha20_poly1305_initiv() 100 ctx->nonce[1] = ctx->chacha.counter[2]; in chacha20_poly1305_initiv() 101 ctx->nonce[2] = ctx->chacha.counter[3]; in chacha20_poly1305_initiv() 137 ctx->chacha.counter[0] = 0; in chacha20_poly1305_tls_cipher() 162 ctx->chacha.counter[0] = 0; in chacha20_poly1305_tls_cipher() 194 ctx->chacha.counter[0] = 0; in chacha20_poly1305_tls_cipher() 198 ctx->chacha.counter[0] = 1; in chacha20_poly1305_tls_cipher() 290 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/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/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/providers/implementations/kdfs/ |
H A D | sskdf.c | 101 size_t counter, out_len, len = derived_key_len; in SSKDF_hash_kdm() local 125 for (counter = 1;; counter++) { in SSKDF_hash_kdm() 126 c[0] = (unsigned char)((counter >> 24) & 0xff); in SSKDF_hash_kdm() 127 c[1] = (unsigned char)((counter >> 16) & 0xff); in SSKDF_hash_kdm() 128 c[2] = (unsigned char)((counter >> 8) & 0xff); in SSKDF_hash_kdm() 129 c[3] = (unsigned char)(counter & 0xff); in SSKDF_hash_kdm() 221 size_t counter, out_len, len; in SSKDF_mac_kdm() local 247 for (counter = 1;; counter++) { in SSKDF_mac_kdm() 248 c[0] = (unsigned char)((counter >> 24) & 0xff); in SSKDF_mac_kdm() 250 c[2] = (unsigned char)((counter >> 8) & 0xff); in SSKDF_mac_kdm() [all …]
|
H A D | x942kdf.c | 272 size_t counter, out_len, len = derived_key_len; in x942kdf_hash_kdm() local 298 for (counter = 1;; counter++) { in x942kdf_hash_kdm() 300 ctr[0] = (unsigned char)((counter >> 24) & 0xff); in x942kdf_hash_kdm() 301 ctr[1] = (unsigned char)((counter >> 16) & 0xff); in x942kdf_hash_kdm() 302 ctr[2] = (unsigned char)((counter >> 8) & 0xff); in x942kdf_hash_kdm() 303 ctr[3] = (unsigned char)(counter & 0xff); in x942kdf_hash_kdm()
|
H A D | kbkdf.c | 194 uint32_t counter, i; in derive() local 211 for (counter = 1; written < ko_len; counter++) { in derive() 212 i = be32(counter); in derive()
|
/openssl/crypto/bn/ |
H A D | bn_blind.c | 22 int counter; member 72 ret->counter = -1; in BN_BLINDING_new() 102 if (b->counter == -1) in BN_BLINDING_update() 103 b->counter = 0; in BN_BLINDING_update() 105 if (++b->counter == BN_BLINDING_COUNTER && b->e != NULL && in BN_BLINDING_update() 124 if (b->counter == BN_BLINDING_COUNTER) in BN_BLINDING_update() 125 b->counter = 0; in BN_BLINDING_update() 145 if (b->counter == -1) in BN_BLINDING_convert_ex() 147 b->counter = 0; in BN_BLINDING_convert_ex()
|
/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() 660 counter = 4 * L - 1; in ossl_ffc_params_FIPS186_4_gen_verify() 664 if (params->pcounter > counter) { in ossl_ffc_params_FIPS186_4_gen_verify() 668 counter = params->pcounter; in ossl_ffc_params_FIPS186_4_gen_verify() 941 counter = 4 * L - 1; /* Was 4096 */ in ossl_ffc_params_FIPS186_2_gen_verify() 944 if (params->pcounter > counter) { in ossl_ffc_params_FIPS186_2_gen_verify() 948 counter = params->pcounter; in ossl_ffc_params_FIPS186_2_gen_verify() [all …]
|
/openssl/crypto/chacha/asm/ |
H A D | chacha-ia64.pl | 24 my ($out,$inp,$len,$key,$counter) = map("r$_",(32..36)); 50 ADDP $counter=0,$counter 65 add @k[15]=4,$counter };; 69 { .mmi; ld4 @k[12]=[$counter],8 72 { .mmi; ld4 @k[14]=[$counter]
|
H A D | chacha-x86_64.pl | 516 mov \$10,$counter # reuse $counter 526 mov \$10,$counter 544 &dec ($counter); 583 xor $counter,$counter 588 lea 1($counter),$counter 696 mov \$10,$counter # reuse $counter 718 &dec ($counter); 2543 mov \$10,$counter # reuse $counter 2684 lea 1($counter),$counter 2755 mov \$10,$counter # reuse $counter [all …]
|
H A D | chacha-armv8-sve.pl | 39 my ($counter) = ("x11"); 197 mov $counter,#10 204 subs $counter,$counter,1 211 mov $counter,#10 218 subs $counter,$counter,1
|
/openssl/doc/man7/ |
H A D | EVP_KDF-KB.pod | 27 choices are "counter" and "feedback". "counter" is the default, and will be 48 The seed parameter is unused in counter mode. 63 Set the fixed value 'r', indicating the length of the counter in bits. 90 Note that currently OpenSSL only implements counter and feedback modes. Other
|
/openssl/providers/implementations/rands/ |
H A D | drbg_hash.c | 328 unsigned char counter[4]; in drbg_hash_generate() local 331 counter[0] = (unsigned char)((reseed_counter >> 24) & 0xff); in drbg_hash_generate() 332 counter[1] = (unsigned char)((reseed_counter >> 16) & 0xff); in drbg_hash_generate() 333 counter[2] = (unsigned char)((reseed_counter >> 8) & 0xff); in drbg_hash_generate() 334 counter[3] = (unsigned char)(reseed_counter & 0xff); in drbg_hash_generate() 349 && add_bytes(drbg, hash->V, counter, 4); in drbg_hash_generate()
|
/openssl/crypto/sm4/asm/ |
H A D | vpsm4-armv8.pl | 39 my ($ptr,$counter)=("x10","w11"); 363 mov $counter,#8 372 subs $counter,$counter,#1 391 mov $counter,#8 396 subs $counter,$counter,#1 408 mov $counter,#8 413 subs $counter,$counter,#1
|
/openssl/doc/man3/ |
H A D | EVP_chacha20.pod | 25 The first 32 bits consists of a counter in little-endian order followed by a 96 30 With an initial counter of 42 (2a in hex) would be expressed as:
|
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/test/ |
H A D | dsatest.c | 39 int counter, ret = 0, i, j; in dsa_test() local 87 &counter, &h, cb))) in dsa_test() 90 if (!TEST_int_eq(counter, 105)) in dsa_test()
|
/openssl/include/crypto/ |
H A D | chacha.h | 29 const unsigned int counter[4]);
|