/freebsd/crypto/openssl/providers/implementations/rands/ |
H A D | drbg_ctr.c | 37 * The state of a DRBG AES-CTR. 56 * Implementation of NIST SP 800-90A CTR DRBG. 58 static void inc_128(PROV_DRBG_CTR *ctr) in inc_128() argument 60 unsigned char *p = &ctr->V[0]; in inc_128() 71 static void ctr_XOR(PROV_DRBG_CTR *ctr, const unsigned char *in, size_t inlen) in ctr_XOR() argument 82 n = inlen < ctr->keylen ? inlen : ctr->keylen; in ctr_XOR() 84 ctr->K[i] ^= in[i]; in ctr_XOR() 85 if (inlen <= ctr->keylen) in ctr_XOR() 88 n = inlen - ctr in ctr_XOR() 100 ctr_BCC_block(PROV_DRBG_CTR * ctr,unsigned char * out,const unsigned char * in,int len) ctr_BCC_block() argument 118 ctr_BCC_blocks(PROV_DRBG_CTR * ctr,const unsigned char * in) ctr_BCC_blocks() argument 136 ctr_BCC_init(PROV_DRBG_CTR * ctr) ctr_BCC_init() argument 151 ctr_BCC_update(PROV_DRBG_CTR * ctr,const unsigned char * in,size_t inlen) ctr_BCC_update() argument 186 ctr_BCC_final(PROV_DRBG_CTR * ctr) ctr_BCC_final() argument 196 ctr_df(PROV_DRBG_CTR * ctr,const unsigned char * in1,size_t in1len,const unsigned char * in2,size_t in2len,const unsigned char * in3,size_t in3len) ctr_df() argument 264 PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data; ctr_update() local 310 PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data; drbg_ctr_instantiate() local 344 PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data; drbg_ctr_reseed() local 381 PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data; drbg_ctr_generate() local 464 PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data; drbg_ctr_uninstantiate() local 482 PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data; drbg_ctr_verify_zeroization() local 495 PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data; drbg_ctr_init_lengths() local 528 PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data; drbg_ctr_init() local 589 PROV_DRBG_CTR *ctr; drbg_ctr_new() local 613 PROV_DRBG_CTR *ctr; drbg_ctr_free() local 630 PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data; drbg_ctr_get_ctx_params() local 663 PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)ctx->data; drbg_ctr_set_ctx_params() local [all...] |
/freebsd/contrib/bearssl/inc/ |
H A D | bearssl_block.h | 46 * functions are provided, for CBC encryption, CBC decryption, and CTR 55 * Function for CTR encryption are defined only for block ciphers with 116 * expansion. These subkeys are appropriate for CTR encryption and 122 * Perform key expansion: subkeys for CTR encryption and decryption 129 * Perform CTR encryption/decryption of some data. Processing is done 143 * CTR encryption/decryption and CBC-MAC, as used in the CCM and EAX 149 * Perform key expansion: subkeys for combined CTR 155 …* - `br_xxx_ctrcbc_encrypt(const br_xxx_ctrcbc_keys *ctx, void *ctr, void *cbcmac, void *data, s… 157 * Perform CTR encryption of some data, and CBC-MAC. Processing is 159 * function applies CTR encryption on the data, using a full [all …]
|
/freebsd/crypto/openssl/test/recipes/ |
H A D | 20-test_rand_config.t | 37 { cipher => 'AES-128-CTR', 38 expected => ["CTR-DRBG", "cipher: 'AES-128-CTR'"], 39 desc => 'CTR-DRBG AES-128 no DRBG' }, 40 { expected => ["CTR-DRBG", "cipher: 'AES-256-CTR'"], 41 desc => 'CTR-DRBG AES-256 defaults' }, 45 { drbg => 'CTR-DRBG', 46 cipher => 'ARIA-128-CTR', 48 expected => ["CTR-DRBG", "cipher: 'ARIA-128-CTR'"], 49 desc => 'CTR-DRBG ARIA-128' }, 51 { drbg => 'CTR-DRBG', [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/ |
H A D | PPCCTRLoops.cpp | 1 //===-- PPCCTRLoops.cpp - Generate CTR loops ------------------------------===// 9 // This pass generates machine instructions for the CTR loops related pseudos: 13 // If a CTR loop can be generated: 18 // If a CTR loop can not be generated due to clobber of CTR: 24 // register allocator to allocate register for DecreaseCTRloop if a CTR can be 25 // generated or if a CTR loop can not be generated, we don't have any condition 54 STATISTIC(NumCTRLoops, "Number of CTR loops generated"); 87 INITIALIZE_PASS_BEGIN(PPCCTRLoops, DEBUG_TYPE, "PowerPC CTR loops generation", 90 INITIALIZE_PASS_END(PPCCTRLoops, DEBUG_TYPE, "PowerPC CTR loops generation", in INITIALIZE_PASS_DEPENDENCY() 112 "CTR loop pseudo is not expanded!"); in runOnMachineFunction() [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_mount/ |
H A D | zfs_mount_all_001_pos.ksh | 50 set -A ctr "" "$TESTCTR" "$TESTCTR/$TESTCTR1" "$TESTCTR1" 59 while (( i < ${#ctr[*]} )); do 62 if [[ -n ${ctr[i]} ]]; then 63 path=$path/${ctr[i]} 66 "${ctr[i]}" "$path" \ 67 "ctr" 74 "${ctr[i]}/${vol[j]}" \ 84 "${ctr[i]}/${fs[j]}" \ 101 ((i = ${#ctr[*]} - 1)) 108 "${ctr[i]}/${vol[j]}" [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/ |
H A D | zfs_unmount_all_001_pos.ksh | 51 set -A ctr "" "$TESTCTR" "$TESTCTR1" "$TESTCTR/$TESTCTR1" 60 while (( i < ${#ctr[*]} )); do 63 if [[ -n ${ctr[i]} ]]; then 64 path=$path/${ctr[i]} 67 "${ctr[i]}" "$path" \ 68 "ctr" 75 "${ctr[i]}/${vol[j]}" \ 84 "${ctr[i]}/${fs[j]}" \ 100 ((i = ${#ctr[*]} - 1)) 107 "${ctr[i]}/${vol[j]}" [all …]
|
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/ |
H A D | zfs_mount_all_001_pos.ksh | 58 set -A ctr "" "$TESTCTR" "$TESTCTR/$TESTCTR1" "$TESTCTR1" 67 while (( i < ${#ctr[*]} )); do 70 if [[ -n ${ctr[i]} ]]; then 71 path=$path/${ctr[i]} 74 "${ctr[i]}" "$path" \ 75 "ctr" 82 "${ctr[i]}/${vol[j]}" \ 92 "${ctr[i]}/${fs[j]}" \ 109 ((i = ${#ctr[*]} - 1)) 116 "${ctr[i]}/${vol[j]}" [all …]
|
/freebsd/sys/dev/hwpmc/ |
H A D | hwpmc_core.h | 87 * 44 Ctr 3 Adaptive Record (v5) 89 * 40 Ctr 2 Adaptive Record (v5) 91 * 36 Ctr 1 Adaptive Record (v5) 93 * 32 Ctr 0 Adaptive Record (v5) 94 * 15 Ctr 3 PMI 95 * 14 Ctr 3 Any Thread (v3) 96 * 13-12 Ctr 3 Enable 97 * 11 Ctr 2 PMI 98 * 10 Ctr 2 Any Thread (v3) 99 * 9-8 Ctr 2 Enable [all …]
|
/freebsd/stand/arm64/libarm64/ |
H A D | cache.c | 43 get_cache_dic(uint64_t ctr) in get_cache_dic() argument 49 return (CTR_DIC_VAL(ctr) != 0); in get_cache_dic() 53 get_cache_idc(uint64_t ctr) in get_cache_idc() argument 59 return (CTR_IDC_VAL(ctr) != 0); in get_cache_idc() 63 get_dcache_line_size(uint64_t ctr) in get_dcache_line_size() argument 71 dcl_size = CTR_DLINE_SIZE(ctr); in get_dcache_line_size() 80 uint64_t cl_size, ctr; in cpu_flush_dcache() local 84 ctr = READ_SPECIALREG(ctr_el0); in cpu_flush_dcache() 86 if (get_cache_idc(ctr)) { in cpu_flush_dcache() 89 cl_size = get_dcache_line_size(ctr); in cpu_flush_dcache() [all …]
|
/freebsd/crypto/openssl/providers/implementations/ciphers/ |
H A D | cipher_chacha20_poly1305_hw.c | 125 unsigned char *buf, *tohash, *ctr, storage[sizeof(zero) + 32]; in chacha20_poly1305_tls_cipher() local 130 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() [all …]
|
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()
|
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zfs_unmount/ |
H A D | zfs_unmount_all_001_pos.ksh | 60 set -A ctr "" "$TESTCTR" "$TESTCTR1" "$TESTCTR/$TESTCTR1" 69 while (( i < ${#ctr[*]} )); do 72 if [[ -n ${ctr[i]} ]]; then 73 path=$path/${ctr[i]} 76 "${ctr[i]}" "$path" \ 77 "ctr" 84 "${ctr[i]}/${vol[j]}" \ 93 "${ctr[i]}/${fs[j]}" \ 109 ((i = ${#ctr[*]} - 1)) 116 "${ctr[i]}/${vol[j]}" [all …]
|
/freebsd/crypto/openssh/ |
H A D | cipher-aesctr.c | 28 * increment counter 'ctr', 30 * (LSB at ctr[len-1], MSB at ctr[0]) 33 aesctr_inc(u8 *ctr, u32 len) in aesctr_inc() argument 39 if (++ctr[i]) /* continue on overflow */ in aesctr_inc() 45 ctr[i] += add; in aesctr_inc() 46 /* constant time for: x = ctr[i] ? 1 : 0 */ in aesctr_inc() 47 x = ctr[i]; in aesctr_inc() 65 memcpy(x->ctr, iv, AES_BLOCK_SIZE); in aesctr_ivsetup() 76 rijndaelEncrypt(x->ek, x->rounds, x->ctr, buf); in aesctr_encrypt_bytes() 77 aesctr_inc(x->ctr, AES_BLOCK_SIZE); in aesctr_encrypt_bytes()
|
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/ |
H A D | zfs_destroy_001_pos.ksh | 37 # 'zfs destroy -r|-rf|-R|-Rf <fs|ctr|vol|snap>' should recursively destroy 42 # models can be created. Only ctr, fs & vol; with snap; with clone. 80 if [[ $dtst != $FS || $dtst != $CTR ]]; then 87 if datasetexists $CTR; then 88 log_must $ZFS destroy -Rf $CTR 105 $CTR|$FS) 151 $CTR) check_dataset datasetnonexists \ 152 $CTR $FS $VOL $FSSNAP $VOLSNAP 158 $FS) check_dataset datasetexists $CTR $VOL 169 $VOL) check_dataset datasetexists $CTR $FS $FSSNAP [all …]
|
H A D | zfs_destroy_003_pos.ksh | 39 # 2. Create fs,vol,ctr,snapshot and clones of snapshot in the two datasets 59 for obj in $ctr2 $ctr1 $ctr; do 82 ctr=$TESTPOOL/$TESTCTR 84 ctr2=$ctr/$TESTCTR2 86 child_fs=$ctr/$TESTFS1 90 child_vol=$ctr/$TESTVOL 94 child_fs_snap_clone=$ctr/$TESTCLONE 98 child_fs1_snap_clone1=$ctr/${TESTCLONE1}_across_ctr 103 log_must $ZFS create $ctr 141 for obj in $child_fs $child_fs1 $ctr $ctr1; do [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/ |
H A D | zfs_destroy_003_pos.ksh | 41 # 2. Create fs,vol,ctr,snapshot and clones of snapshot in the two datasets 52 for obj in $ctr2 $ctr1 $ctr; do 74 ctr=$TESTPOOL/$TESTCTR 76 ctr2=$ctr/$TESTCTR2 78 child_fs=$ctr/$TESTFS1 82 child_vol=$ctr/$TESTVOL 86 child_fs_snap_clone=$ctr/$TESTCLONE 90 child_fs1_snap_clone1=$ctr/${TESTCLONE1}_across_ctr 95 log_must zfs create $ctr 133 for obj in $child_fs $child_fs1 $ctr $ctr1; do [all …]
|
H A D | zfs_destroy_001_pos.ksh | 38 # 'zfs destroy -r|-rf|-R|-Rf <fs|ctr|vol|snap>' should recursively destroy 43 # models can be created. Only ctr, fs & vol; with snap; with clone. 80 datasetexists $CTR && destroy_dataset $CTR -Rf 96 $CTR|$FS) 173 $CTR) check_dataset datasetnonexists \ 174 $CTR $FS $VOL $FSSNAP $VOLSNAP 180 $FS) check_dataset datasetexists $CTR $VOL 191 $VOL) check_dataset datasetexists $CTR $FS $FSSNAP 199 check_dataset datasetexists $CTR $FS $VOL $VOLSNAP 207 check_dataset datasetexists $CTR $FS $VOL $FSSNAP [all …]
|
H A D | zfs_destroy_005_neg.ksh | 90 negative_test "-f" "$CTR $FS $VOL" 97 negative_test "-r -rf" "$CTR $FS $VOL" 100 # Get $FS mountpoint and make it busy, and verify 'zfs destroy $CTR' fails 108 negative_test "-R -rR" $CTR 111 check_dataset datasetexists $CTR $FS $VOL 126 check_dataset datasetexists $CTR $FS $VOL $VOLSNAP $VOLCLONE 135 # Then verify 'zfs destroy $CTR' fails without '-f'. 144 negative_test "-R -rR" $CTR 145 check_dataset datasetexists $CTR $VOL 162 check_dataset datasetexists $CTR $VOL $FS $FSSNAP $FSCLONE [all …]
|
/freebsd/sys/crypto/openssl/arm/ |
H A D | ossl_aes_gcm.c | 57 uint32_t ctr; in gcm_setiv() local 71 ctr = 1; in gcm_setiv() 77 ctr++; in gcm_setiv() 80 ctx->gcm.Yi.d[3] = bswap32(ctr); in gcm_setiv() 82 ctx->gcm.Yi.d[3] = ctr; in gcm_setiv() 161 unsigned int n, ctr, mres; in gcm_encrypt() local 180 ctr = bswap32(ctx->gcm.Yi.d[3]); in gcm_encrypt() 182 ctr = ctx->gcm.Yi.d[3]; in gcm_encrypt() 207 ctr += (unsigned int)j; in gcm_encrypt() 209 ctx->gcm.Yi.d[3] = bswap32(ctr); in gcm_encrypt() [all …]
|
/freebsd/sys/crypto/openssl/amd64/ |
H A D | ossl_aes_gcm.c | 253 uint32_t ctr; in gcm_setiv_aesni() local 267 ctr = 1; in gcm_setiv_aesni() 273 ctr++; in gcm_setiv_aesni() 276 ctx->gcm.Yi.d[3] = bswap32(ctr); in gcm_setiv_aesni() 278 ctx->gcm.Yi.d[3] = ctr; in gcm_setiv_aesni() 331 unsigned int n, ctr, mres; in gcm_encrypt() local 349 ctr = bswap32(ctx->gcm.Yi.d[3]); in gcm_encrypt() 351 ctr = ctx->gcm.Yi.d[3]; in gcm_encrypt() 359 ++ctr; in gcm_encrypt() 361 ctx->gcm.Yi.d[3] = bswap32(ctr); in gcm_encrypt() [all …]
|
/freebsd/crypto/openssl/crypto/modes/ |
H A D | gcm128.c | 55 * [which is nothing but trivial in CTR mode]. In "Shoup's" case it's 819 unsigned int ctr; local 835 ctr = 1; 878 ctr = BSWAP4(ctx->Xi.d[3]); 880 ctr = GETU32(ctx->Xi.c + 12); 883 ctr = ctx->Xi.d[3]; 894 ++ctr; 897 ctx->Yi.d[3] = BSWAP4(ctr); 899 PUTU32(ctx->Yi.c + 12, ctr); 902 ctx->Yi.d[3] = ctr; [all …]
|
/freebsd/contrib/wireguard-tools/ |
H A D | curve25519-hacl64.h | 86 u32 ctr = 0; in fproduct_carry_wide_() local 87 u128 tctr = tmp[ctr]; in fproduct_carry_wide_() 88 u128 tctrp1 = tmp[ctr + 1]; in fproduct_carry_wide_() 91 tmp[ctr] = ((u128)(r0)); in fproduct_carry_wide_() 92 tmp[ctr + 1] = ((tctrp1) + (c)); in fproduct_carry_wide_() 95 u32 ctr = 1; in fproduct_carry_wide_() local 96 u128 tctr = tmp[ctr]; in fproduct_carry_wide_() 97 u128 tctrp1 = tmp[ctr + 1]; in fproduct_carry_wide_() 100 tmp[ctr] = ((u128)(r0)); in fproduct_carry_wide_() 101 tmp[ctr + 1] = ((tctrp1) + (c)); in fproduct_carry_wide_() [all …]
|
/freebsd/contrib/bearssl/tools/ |
H A D | ta.c | 91 print_ta_internals(br_x509_trust_anchor *ta, long ctr) in print_ta_internals() argument 95 sprintf(tmp, "TA%ld_DN", ctr); in print_ta_internals() 99 sprintf(tmp, "TA%ld_RSA_N", ctr); in print_ta_internals() 101 sprintf(tmp, "TA%ld_RSA_E", ctr); in print_ta_internals() 105 sprintf(tmp, "TA%ld_EC_Q", ctr); in print_ta_internals() 117 print_ta(br_x509_trust_anchor *ta, long ctr) in print_ta() argument 123 ctr, ctr); in print_ta() 134 " sizeof TA%ld_RSA_N,\n", ctr, ctr); in print_ta() 136 " sizeof TA%ld_RSA_E,\n", ctr, ctr); in print_ta() 149 " sizeof TA%ld_EC_Q,\n", ctr, ctr); in print_ta()
|
/freebsd/crypto/openssl/crypto/evp/ |
H A D | e_chacha20_poly1305.c | 219 unsigned char *buf, *tohash, *ctr, storage[sizeof(zero) + 32]; in chacha20_poly1305_tls_cipher() local 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() [all …]
|
/freebsd/crypto/openssl/ssl/record/ |
H A D | ssl3_record.c | 996 size_t bs, ctr, padnum, loop; in tls1_enc() local 1029 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 1030 if (recs[ctr].data != recs[ctr].input) { in tls1_enc() 1037 } else if (RAND_bytes_ex(s->ctx->libctx, recs[ctr].input, in tls1_enc() 1061 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 1062 memmove(recs[ctr].data, recs[ctr].input, recs[ctr].length); in tls1_enc() 1063 recs[ctr].input = recs[ctr].data; in tls1_enc() 1081 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 1082 reclen[ctr] = recs[ctr].length; in tls1_enc() 1098 memcpy(buf[ctr], dtlsseq, 8); in tls1_enc() [all …]
|