/openssl/providers/implementations/rands/ |
H A D | drbg_ctr.c | 94 ctr->V[i] ^= in[i + ctr->keylen]; in ctr_XOR() 189 memset(ctr->bltmp + ctr->bltmp_pos, 0, 16 - ctr->bltmp_pos); in ctr_BCC_final() 190 if (!ctr_BCC_blocks(ctr, ctr->bltmp)) in ctr_BCC_final() 237 if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX, &outlen, ctr->KX + ctr->keylen, in ctr_df() 241 if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 16, &outlen, ctr->KX, in ctr_df() 283 memcpy(ctr->K, out, ctr->keylen); in ctr_update() 284 memcpy(ctr->V, out + ctr->keylen, 16); in ctr_update() 315 memset(ctr->K, 0, sizeof(ctr->K)); in drbg_ctr_instantiate() 316 memset(ctr->V, 0, sizeof(ctr->V)); in drbg_ctr_instantiate() 466 OPENSSL_cleanse(ctr->K, sizeof(ctr->K)); in drbg_ctr_uninstantiate() [all …]
|
/openssl/ssl/record/methods/ |
H A D | tls1_meth.c | 177 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_cipher() 178 if (recs[ctr].data != recs[ctr].input) { in tls1_cipher() 209 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_cipher() 210 reclen[ctr] = recs[ctr].length; in tls1_cipher() 233 buf[ctr][8] = recs[ctr].type; in tls1_cipher() 271 if (reclen[ctr] == 0 || reclen[ctr] % bs != 0) { in tls1_cipher() 281 for (ctr = 0; ctr < n_recs; ctr++) in tls1_cipher() 282 data[ctr] = recs[ctr].data; in tls1_cipher() 290 for (ctr = 0; ctr < n_recs; ctr++) in tls1_cipher() 291 data[ctr] = recs[ctr].input; in tls1_cipher() [all …]
|
/openssl/ssl/record/ |
H A D | ssl3_record.c | 294 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 313 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 314 memmove(recs[ctr].data, recs[ctr].input, recs[ctr].length); in tls1_enc() 315 recs[ctr].input = recs[ctr].data; in tls1_enc() 333 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 334 reclen[ctr] = recs[ctr].length; in tls1_enc() 358 buf[ctr][8] = recs[ctr].type; in tls1_enc() 398 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 399 data[ctr] = recs[ctr].data; in tls1_enc() 407 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() [all …]
|
/openssl/crypto/modes/ |
H A D | gcm128.c | 583 unsigned int ctr; in CRYPTO_gcm128_setiv() local 596 ctr = 1; in CRYPTO_gcm128_setiv() 655 ++ctr; in CRYPTO_gcm128_setiv() 866 ++ctr; in CRYPTO_gcm128_encrypt() 885 ++ctr; in CRYPTO_gcm128_encrypt() 916 ++ctr; in CRYPTO_gcm128_encrypt() 1091 ++ctr; in CRYPTO_gcm128_decrypt() 1113 ++ctr; in CRYPTO_gcm128_decrypt() 1147 ++ctr; in CRYPTO_gcm128_decrypt() 1308 ++ctr; in CRYPTO_gcm128_encrypt_ctr32() [all …]
|
/openssl/providers/implementations/ciphers/ |
H A D | cipher_chacha20_poly1305_hw.c | 132 ctr = buf + CHACHA_BLK_SIZE; in chacha20_poly1305_tls_cipher() 149 ctr = xor128_encrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 151 ctr = xor128_decrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 155 tohash_len = (size_t)(ctr - tohash); in chacha20_poly1305_tls_cipher() 174 out[i] = ctr[i] ^= in[i]; in chacha20_poly1305_tls_cipher() 179 out[i] = ctr[i] ^ c; in chacha20_poly1305_tls_cipher() 180 ctr[i] = c; in chacha20_poly1305_tls_cipher() 188 memset(ctr + i, 0, tail); in chacha20_poly1305_tls_cipher() 189 ctr += i + tail; in chacha20_poly1305_tls_cipher() 201 tohash = ctr; in chacha20_poly1305_tls_cipher() [all …]
|
H A D | cipher_sm4_gcm_hw.c | 29 ctx->ctr = (ctr128_f) HWSM4_ctr32_encrypt_blocks; in sm4_gcm_initkey() 31 ctx->ctr = (ctr128_f)NULL; in sm4_gcm_initkey() 39 ctx->ctr = (ctr128_f) vpsm4_ctr32_encrypt_blocks; in sm4_gcm_initkey() 45 ctx->ctr = (ctr128_f)NULL; in sm4_gcm_initkey() 56 if (ctx->ctr != NULL) { in hw_gcm_cipher_update() 57 if (CRYPTO_gcm128_encrypt_ctr32(&ctx->gcm, in, out, len, ctx->ctr)) in hw_gcm_cipher_update() 64 if (ctx->ctr != NULL) { in hw_gcm_cipher_update() 65 if (CRYPTO_gcm128_decrypt_ctr32(&ctx->gcm, in, out, len, ctx->ctr)) in hw_gcm_cipher_update()
|
H A D | cipher_aes_siv_hw.c | 29 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 D | cipher_aes_gcm_hw_t4.inc | 18 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 D | cipher_aes_gcm_hw.c | 66 if (ctx->ctr != NULL) { in generic_aes_gcm_cipher_update() 84 len - bulk, ctx->ctr)) in generic_aes_gcm_cipher_update() 87 if (CRYPTO_gcm128_encrypt_ctr32(&ctx->gcm, in, out, len, ctx->ctr)) in generic_aes_gcm_cipher_update() 95 if (ctx->ctr != NULL) { in generic_aes_gcm_cipher_update() 113 len - bulk, ctx->ctr)) in generic_aes_gcm_cipher_update() 116 if (CRYPTO_gcm128_decrypt_ctr32(&ctx->gcm, in, out, len, ctx->ctr)) in generic_aes_gcm_cipher_update()
|
H A D | cipher_aes_hw_t4.inc | 11 * 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 D | cipher_aes_hw.c | 84 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() 159 PROV_CIPHER_HW_aes_mode(ctr)
|
H A D | cipher_aria.c | 82 IMPLEMENT_generic_cipher(aria, ARIA, ctr, CTR, 0, 256, 8, 128, stream) 84 IMPLEMENT_generic_cipher(aria, ARIA, ctr, CTR, 0, 192, 8, 128, stream) 86 IMPLEMENT_generic_cipher(aria, ARIA, ctr, CTR, 0, 128, 8, 128, stream)
|
H A D | cipher_aes.c | 89 IMPLEMENT_generic_cipher(aes, AES, ctr, CTR, 0, 256, 8, 128, stream) 91 IMPLEMENT_generic_cipher(aes, AES, ctr, CTR, 0, 192, 8, 128, stream) 93 IMPLEMENT_generic_cipher(aes, AES, ctr, CTR, 0, 128, 8, 128, stream)
|
H A D | cipher_camellia.c | 88 IMPLEMENT_generic_cipher(camellia, CAMELLIA, ctr, CTR, 0, 256, 8, 128, stream) 90 IMPLEMENT_generic_cipher(camellia, CAMELLIA, ctr, CTR, 0, 192, 8, 128, stream) 92 IMPLEMENT_generic_cipher(camellia, CAMELLIA, ctr, CTR, 0, 128, 8, 128, stream)
|
H A D | cipher_sm4_hw.c | 39 ctx->stream.ctr = (ctr128_f)HWSM4_ctr32_encrypt_blocks; in cipher_hw_sm4_initkey() 55 ctx->stream.ctr = (ctr128_f)vpsm4_ctr32_encrypt_blocks; in cipher_hw_sm4_initkey() 115 PROV_CIPHER_HW_sm4_mode(ctr)
|
/openssl/crypto/sm4/asm/ |
H A D | sm4-armv8.pl | 490 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 D | vpsm4-armv8.pl | 955 my ($ctr)=("w5"); 998 add $ctr,$ctr,#1 1000 add $ctr,$ctr,#1 1002 add $ctr,$ctr,#1 1004 add $ctr,$ctr,#1 1022 add $ctr,$ctr,#1 1024 add $ctr,$ctr,#1 1026 add $ctr,$ctr,#1 1028 add $ctr,$ctr,#1 1065 add $ctr,$ctr,#1 [all …]
|
/openssl/crypto/evp/ |
H A D | e_chacha20_poly1305.c | 225 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 D | e_sm4.c | 32 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 D | e_camellia.c | 37 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 D | tls13encryptiontest.c | 314 size_t ivlen, ctr; in test_tls13_encryption() local 354 for (ctr = 0; ctr < OSSL_NELEM(refdata); ctr++) { in test_tls13_encryption() 357 if (!load_record(&rec, &refdata[ctr], &key, iv, ivlen, seqbuf)) { in test_tls13_encryption() 376 TEST_info("Failed to encrypt record %zu", ctr); in test_tls13_encryption() 379 if (!TEST_true(test_record(&rec, &refdata[ctr], 1))) { in test_tls13_encryption() 380 TEST_info("Record %zu encryption test failed", ctr); in test_tls13_encryption() 396 TEST_info("Failed to decrypt record %zu", ctr); in test_tls13_encryption() 399 if (!TEST_true(test_record(&rec, &refdata[ctr], 0))) { in test_tls13_encryption() 400 TEST_info("Record %zu decryption test failed", ctr); in test_tls13_encryption() 411 TEST_note("PASS: %zu records tested", ctr); in test_tls13_encryption()
|
H A D | asynctest.c | 19 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 D | mkbuildinf.pl | 41 my $ctr = 0; 45 if (($ctr++ % 16) == 0) { 46 if ($ctr != 1) {
|
/openssl/crypto/chacha/asm/ |
H A D | chacha-armv8.pl | 212 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 …]
|
/openssl/include/crypto/ |
H A D | siv.h | 15 EVP_CIPHER *cbc, EVP_CIPHER *ctr, 18 const EVP_CIPHER *cbc, const EVP_CIPHER *ctr,
|