Home
last modified time | relevance | path

Searched refs:ctr (Results 1 – 25 of 62) sorted by relevance

123

/openssl/providers/implementations/rands/
H A Ddrbg_ctr.c96 ctr->V[i] ^= in[i + ctr->keylen]; in ctr_XOR()
191 memset(ctr->bltmp + ctr->bltmp_pos, 0, 16 - ctr->bltmp_pos); in ctr_BCC_final()
192 if (!ctr_BCC_blocks(ctr, ctr->bltmp)) in ctr_BCC_final()
239 if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX, &outlen, ctr->KX + ctr->keylen, in ctr_df()
243 if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 16, &outlen, ctr->KX, in ctr_df()
285 memcpy(ctr->K, out, ctr->keylen); in ctr_update()
286 memcpy(ctr->V, out + ctr->keylen, 16); in ctr_update()
317 memset(ctr->K, 0, sizeof(ctr->K)); in drbg_ctr_instantiate()
318 memset(ctr->V, 0, sizeof(ctr->V)); in drbg_ctr_instantiate()
477 OPENSSL_cleanse(ctr->K, sizeof(ctr->K)); in drbg_ctr_uninstantiate()
[all …]
/openssl/ssl/record/methods/
H A Dtls1_meth.c211 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_cipher()
212 if (recs[ctr].data != recs[ctr].input) { in tls1_cipher()
248 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_cipher()
249 reclen[ctr] = recs[ctr].length; in tls1_cipher()
271 buf[ctr][8] = recs[ctr].type; in tls1_cipher()
309 if (reclen[ctr] == 0 || reclen[ctr] % bs != 0) { in tls1_cipher()
317 for (ctr = 0; ctr < n_recs; ctr++) in tls1_cipher()
318 data[ctr] = recs[ctr].data; in tls1_cipher()
326 for (ctr = 0; ctr < n_recs; ctr++) in tls1_cipher()
327 data[ctr] = recs[ctr].input; in tls1_cipher()
[all …]
/openssl/providers/implementations/ciphers/
H A Dcipher_chacha20_poly1305_hw.c130 ctr = buf + CHACHA_BLK_SIZE; in chacha20_poly1305_tls_cipher()
147 ctr = xor128_encrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher()
149 ctr = xor128_decrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher()
153 tohash_len = (size_t)(ctr - tohash); in chacha20_poly1305_tls_cipher()
172 out[i] = ctr[i] ^= in[i]; in chacha20_poly1305_tls_cipher()
177 out[i] = ctr[i] ^ c; in chacha20_poly1305_tls_cipher()
178 ctr[i] = c; in chacha20_poly1305_tls_cipher()
186 memset(ctr + i, 0, tail); in chacha20_poly1305_tls_cipher()
187 ctr += i + tail; in chacha20_poly1305_tls_cipher()
199 tohash = ctr; in chacha20_poly1305_tls_cipher()
[all …]
H A Dcipher_aes_siv_hw.c29 EVP_CIPHER_free(ctx->ctr); in aes_siv_initkey()
31 ctx->ctr = NULL; in aes_siv_initkey()
36 ctx->ctr = EVP_CIPHER_fetch(libctx, "AES-128-CTR", propq); in aes_siv_initkey()
40 ctx->ctr = EVP_CIPHER_fetch(libctx, "AES-192-CTR", propq); in aes_siv_initkey()
44 ctx->ctr = EVP_CIPHER_fetch(libctx, "AES-256-CTR", propq); in aes_siv_initkey()
49 if (ctx->cbc == NULL || ctx->ctr == NULL) in aes_siv_initkey()
55 return ossl_siv128_init(sctx, key, klen, ctx->cbc, ctx->ctr, libctx, in aes_siv_initkey()
72 if (out->ctr != NULL) in aes_siv_dupctx()
73 EVP_CIPHER_up_ref(out->ctr); in aes_siv_dupctx()
100 EVP_CIPHER_free(ctx->ctr); in aes_siv_cleanup()
H A Dcipher_sm4_gcm_hw.c20 ctx->ctr = (ctr128_f)fn_ctr; \
64 if (ctx->ctr != NULL) { in hw_gcm_cipher_update()
65 if (CRYPTO_gcm128_encrypt_ctr32(&ctx->gcm, in, out, len, ctx->ctr)) in hw_gcm_cipher_update()
72 if (ctx->ctr != NULL) { in hw_gcm_cipher_update()
73 if (CRYPTO_gcm128_decrypt_ctr32(&ctx->gcm, in, out, len, ctx->ctr)) in hw_gcm_cipher_update()
H A Dcipher_aes_gcm_hw_t4.inc18 ctr128_f ctr;
25 ctr = (ctr128_f)aes128_t4_ctr32_encrypt;
28 ctr = (ctr128_f)aes192_t4_ctr32_encrypt;
31 ctr = (ctr128_f)aes256_t4_ctr32_encrypt;
37 GCM_HW_SET_KEY_CTR_FN(ks, aes_t4_set_encrypt_key, aes_t4_encrypt, ctr);
H A Dcipher_aes_gcm_hw.c65 if (ctx->ctr != NULL) { in generic_aes_gcm_cipher_update()
83 len - bulk, ctx->ctr)) in generic_aes_gcm_cipher_update()
86 if (CRYPTO_gcm128_encrypt_ctr32(&ctx->gcm, in, out, len, ctx->ctr)) in generic_aes_gcm_cipher_update()
94 if (ctx->ctr != NULL) { in generic_aes_gcm_cipher_update()
112 len - bulk, ctx->ctr)) in generic_aes_gcm_cipher_update()
115 if (CRYPTO_gcm128_decrypt_ctr32(&ctx->gcm, in, out, len, ctx->ctr)) in generic_aes_gcm_cipher_update()
H A Dcipher_aes_hw_t4.inc11 * Sparc t4 support for AES modes ecb, cbc, ofb, cfb, ctr.
55 dat->stream.ctr = (ctr128_f)aes128_t4_ctr32_encrypt;
63 dat->stream.ctr = (ctr128_f)aes192_t4_ctr32_encrypt;
71 dat->stream.ctr = (ctr128_f)aes256_t4_ctr32_encrypt;
H A Dcipher_aria.c80 IMPLEMENT_generic_cipher(aria, ARIA, ctr, CTR, 0, 256, 8, 128, stream)
82 IMPLEMENT_generic_cipher(aria, ARIA, ctr, CTR, 0, 192, 8, 128, stream)
84 IMPLEMENT_generic_cipher(aria, ARIA, ctr, CTR, 0, 128, 8, 128, stream)
H A Dcipher_camellia.c86 IMPLEMENT_generic_cipher(camellia, CAMELLIA, ctr, CTR, 0, 256, 8, 128, stream)
88 IMPLEMENT_generic_cipher(camellia, CAMELLIA, ctr, CTR, 0, 192, 8, 128, stream)
90 IMPLEMENT_generic_cipher(camellia, CAMELLIA, ctr, CTR, 0, 128, 8, 128, stream)
H A Dcipher_aes.c87 IMPLEMENT_generic_cipher(aes, AES, ctr, CTR, 0, 256, 8, 128, stream)
89 IMPLEMENT_generic_cipher(aes, AES, ctr, CTR, 0, 192, 8, 128, stream)
91 IMPLEMENT_generic_cipher(aes, AES, ctr, CTR, 0, 128, 8, 128, stream)
H A Dcipher_aes_hw.c84 dat->stream.ctr = (ctr128_f)HWAES_ctr32_encrypt_blocks; in cipher_hw_aes_initkey()
94 dat->stream.ctr = (ctr128_f)ossl_bsaes_ctr32_encrypt_blocks; in cipher_hw_aes_initkey()
112 dat->stream.ctr = (ctr128_f)AES_ctr32_encrypt; in cipher_hw_aes_initkey()
163 PROV_CIPHER_HW_aes_mode(ctr)
H A Dcipher_sm4_hw.c39 ctx->stream.ctr = (ctr128_f)HWSM4_ctr32_encrypt_blocks; in cipher_hw_sm4_initkey()
55 ctx->stream.ctr = (ctr128_f)vpsm4_ex_ctr32_encrypt_blocks; in cipher_hw_sm4_initkey()
68 ctx->stream.ctr = (ctr128_f)vpsm4_ctr32_encrypt_blocks; in cipher_hw_sm4_initkey()
149 PROV_CIPHER_HW_sm4_mode(ctr)
/openssl/crypto/sm4/asm/
H A Dsm4-armv8.pl490 my ($ctr)=("w5");
517 add $ctr,$ctr,#1
519 add $ctr,$ctr,#1
521 add $ctr,$ctr,#1
530 add $ctr,$ctr,#1
532 add $ctr,$ctr,#1
534 add $ctr,$ctr,#1
536 add $ctr,$ctr,#1
562 add $ctr,$ctr,#1
580 add $ctr,$ctr,#1
[all …]
H A Dvpsm4-armv8.pl1056 my ($ctr)=("w5");
1099 add $ctr,$ctr,#1
1101 add $ctr,$ctr,#1
1103 add $ctr,$ctr,#1
1105 add $ctr,$ctr,#1
1123 add $ctr,$ctr,#1
1125 add $ctr,$ctr,#1
1127 add $ctr,$ctr,#1
1129 add $ctr,$ctr,#1
1166 add $ctr,$ctr,#1
[all …]
H A Dvpsm4_ex-armv8.pl1046 my ($ctr)=("w5");
1089 add $ctr,$ctr,#1
1091 add $ctr,$ctr,#1
1093 add $ctr,$ctr,#1
1095 add $ctr,$ctr,#1
1113 add $ctr,$ctr,#1
1115 add $ctr,$ctr,#1
1117 add $ctr,$ctr,#1
1119 add $ctr,$ctr,#1
1156 add $ctr,$ctr,#1
[all …]
/openssl/crypto/modes/
H A Dgcm128.c635 unsigned int ctr; in CRYPTO_gcm128_setiv() local
648 ctr = 1; in CRYPTO_gcm128_setiv()
707 ++ctr; in CRYPTO_gcm128_setiv()
918 ++ctr; in CRYPTO_gcm128_encrypt()
937 ++ctr; in CRYPTO_gcm128_encrypt()
968 ++ctr; in CRYPTO_gcm128_encrypt()
1143 ++ctr; in CRYPTO_gcm128_decrypt()
1165 ++ctr; in CRYPTO_gcm128_decrypt()
1199 ++ctr; in CRYPTO_gcm128_decrypt()
1360 ++ctr; in CRYPTO_gcm128_encrypt_ctr32()
[all …]
/openssl/crypto/evp/
H A De_chacha20_poly1305.c225 ctr = buf + CHACHA_BLK_SIZE; in chacha20_poly1305_tls_cipher()
243 ctr = xor128_encrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher()
245 ctr = xor128_decrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher()
249 tohash_len = (size_t)(ctr - tohash); in chacha20_poly1305_tls_cipher()
268 out[i] = ctr[i] ^= in[i]; in chacha20_poly1305_tls_cipher()
273 out[i] = ctr[i] ^ c; in chacha20_poly1305_tls_cipher()
274 ctr[i] = c; in chacha20_poly1305_tls_cipher()
282 memset(ctr + i, 0, tail); in chacha20_poly1305_tls_cipher()
283 ctr += i + tail; in chacha20_poly1305_tls_cipher()
295 tohash = ctr; in chacha20_poly1305_tls_cipher()
[all …]
H A De_sm4.c32 ctr128_f ctr; member
54 BLOCK_CIPHER_generic(nid,1,16,ctr,ctr,CTR,flags)
113 dat->stream.ctr = (ctr128_f) HWSM4_ctr32_encrypt_blocks; in sm4_init_key()
129 dat->stream.ctr = (ctr128_f) vpsm4_ctr32_encrypt_blocks; in sm4_init_key()
212 if (dat->stream.ctr) in sm4_ctr_cipher()
216 &num, dat->stream.ctr); in sm4_ctr_cipher()
H A De_camellia.c37 ctr128_f ctr; member
88 dat->stream.ctr = (ctr128_f) cmll128_t4_ctr32_encrypt; in cmll_t4_init_key()
97 dat->stream.ctr = (ctr128_f) cmll256_t4_ctr32_encrypt; in cmll_t4_init_key()
189 BLOCK_CIPHER_generic(nid, keylen, 1, 16, ctr, ctr, CTR, flags)
334 if (dat->stream.ctr) in camellia_ctr_cipher()
338 dat->stream.ctr); in camellia_ctr_cipher()
/openssl/test/
H A Dtls13encryptiontest.c313 size_t ivlen, ctr; in test_tls13_encryption() local
326 for (ctr = 0; ctr < OSSL_NELEM(refdata); ctr++) { in test_tls13_encryption()
329 if (!load_record(&rec, &refdata[ctr], &key, iv, ivlen, seqbuf)) { in test_tls13_encryption()
348 TEST_info("Failed to encrypt record %zu", ctr); in test_tls13_encryption()
352 if (!TEST_true(test_record(&rec, &refdata[ctr], 1))) { in test_tls13_encryption()
353 TEST_info("Record %zu encryption test failed", ctr); in test_tls13_encryption()
371 TEST_info("Failed to decrypt record %zu", ctr); in test_tls13_encryption()
375 if (!TEST_true(test_record(&rec, &refdata[ctr], 0))) { in test_tls13_encryption()
376 TEST_info("Record %zu decryption test failed", ctr); in test_tls13_encryption()
389 TEST_note("PASS: %zu records tested", ctr); in test_tls13_encryption()
H A Dasynctest.c19 static int ctr = 0; variable
33 ctr++; in add_two()
35 ctr++; in add_two()
204 ctr = 0; in test_ASYNC_start_job()
210 || ctr != 1 in test_ASYNC_start_job()
213 || ctr != 2 in test_ASYNC_start_job()
/openssl/util/
H A Dmkbuildinf.pl43 my $ctr = 0;
47 if (($ctr++ % 16) == 0) {
48 if ($ctr != 1) {
/openssl/crypto/aes/asm/
H A Daesv8-armx.pl1808 rev $ctr, $ctr
1852 add $ctr,$ctr,#6
2164 add $ctr,$ctr,#3
2168 add $ctr,$ctr,#3
2324 add $ctr,$ctr,#3
2373 add $ctr,$ctr,#3
2559 rev $ctr, $ctr
2601 add $ctr,$ctr,#2
2740 add $ctr,$ctr,#5
2745 sub $ctr,$ctr,#5
[all …]
/openssl/crypto/chacha/asm/
H A Dchacha-armv8.pl212 mov $ctr,#10
215 sub $ctr,$ctr,#1
220 cbnz $ctr,.Loop
300 add $ctr,sp,$len
372 mov $ctr,sp
541 mov $ctr,#10
544 sub $ctr,$ctr,#1
976 mov $ctr,#5
980 sub $ctr,$ctr,#1
1092 mov $ctr,#5
[all …]

Completed in 49 milliseconds

123