/freebsd/crypto/openssh/regress/unittests/sshkey/ |
H A D | test_sshkey.c | 184 struct sshkey *k1 = NULL, *k2 = NULL, *k3 = NULL, *kf = NULL; in sshkey_tests() local 194 k1 = sshkey_new(-42); in sshkey_tests() 195 ASSERT_PTR_EQ(k1, NULL); in sshkey_tests() 199 k1 = sshkey_new(KEY_UNSPEC); in sshkey_tests() 200 ASSERT_PTR_NE(k1, NULL); in sshkey_tests() 201 sshkey_free(k1); in sshkey_tests() 206 k1 = sshkey_new(KEY_RSA); in sshkey_tests() 207 ASSERT_PTR_NE(k1, NULL); in sshkey_tests() 208 ASSERT_PTR_NE(k1->pkey, NULL); in sshkey_tests() 209 sshkey_free(k1); in sshkey_tests() [all …]
|
H A D | test_fuzz.c | 52 struct sshkey *k1; in public_fuzz() local 66 &k1), 0); in public_fuzz() 67 sshkey_free(k1); in public_fuzz() 71 if (sshkey_from_blob(fuzz_ptr(fuzz), fuzz_len(fuzz), &k1) == 0) in public_fuzz() 72 sshkey_free(k1); in public_fuzz() 113 struct sshkey *k1; in sshkey_fuzz_tests() local 123 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0); in sshkey_fuzz_tests() 124 sshkey_free(k1); in sshkey_fuzz_tests() 131 if (sshkey_parse_private_fileblob(fuzzed, "", &k1, NULL) == 0) in sshkey_fuzz_tests() 132 sshkey_free(k1); in sshkey_fuzz_tests() [all …]
|
H A D | test_file.c | 46 struct sshkey *k1, *k2; in sshkey_file_tests() local 61 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0); in sshkey_file_tests() 63 ASSERT_PTR_NE(k1, NULL); in sshkey_file_tests() 67 ASSERT_BIGNUM_EQ(rsa_n(k1), a); in sshkey_file_tests() 68 ASSERT_BIGNUM_EQ(rsa_p(k1), b); in sshkey_file_tests() 69 ASSERT_BIGNUM_EQ(rsa_q(k1), c); in sshkey_file_tests() 81 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests() 90 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests() 100 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests() 108 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests() [all …]
|
/freebsd/contrib/jemalloc/include/jemalloc/internal/ |
H A D | hash.h | 88 uint32_t k1 = hash_get_block_32(blocks, i); in hash_x86_32() local 90 k1 *= c1; in hash_x86_32() 91 k1 = hash_rotl_32(k1, 15); in hash_x86_32() 92 k1 *= c2; in hash_x86_32() 94 h1 ^= k1; in hash_x86_32() 104 uint32_t k1 = 0; in hash_x86_32() local 107 case 3: k1 ^= tail[2] << 16; JEMALLOC_FALLTHROUGH in hash_x86_32() 108 case 2: k1 ^= tail[1] << 8; JEMALLOC_FALLTHROUGH in hash_x86_32() 109 case 1: k1 ^= tail[0]; k1 *= c1; k1 = hash_rotl_32(k1, 15); in hash_x86_32() 110 k1 *= c2; h1 ^= k1; in hash_x86_32() [all …]
|
/freebsd/sys/contrib/ck/src/ |
H A D | ck_ht_hash.h | 137 uint32_t k1 = getblock(blocks,i); in MurmurHash3_x86_32() local 139 k1 *= c1; in MurmurHash3_x86_32() 140 k1 = ROTL32(k1,15); in MurmurHash3_x86_32() 141 k1 *= c2; in MurmurHash3_x86_32() 143 h1 ^= k1; in MurmurHash3_x86_32() 153 uint32_t k1 = 0; in MurmurHash3_x86_32() local 157 case 3: k1 ^= tail[2] << 16; in MurmurHash3_x86_32() 159 case 2: k1 ^= tail[1] << 8; in MurmurHash3_x86_32() 161 case 1: k1 ^= tail[0]; in MurmurHash3_x86_32() 162 k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1; in MurmurHash3_x86_32() [all …]
|
/freebsd/contrib/bzip2/ |
H A D | bzlib.c | 542 UChar k1; in unRLE_obuf_to_output_FAST() local 569 BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; in unRLE_obuf_to_output_FAST() 570 k1 ^= BZ_RAND_MASK; s->nblock_used++; in unRLE_obuf_to_output_FAST() 572 if (k1 != s->k0) { s->k0 = k1; continue; }; in unRLE_obuf_to_output_FAST() 575 BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; in unRLE_obuf_to_output_FAST() 576 k1 ^= BZ_RAND_MASK; s->nblock_used++; in unRLE_obuf_to_output_FAST() 578 if (k1 != s->k0) { s->k0 = k1; continue; }; in unRLE_obuf_to_output_FAST() 581 BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; in unRLE_obuf_to_output_FAST() 582 k1 ^= BZ_RAND_MASK; s->nblock_used++; in unRLE_obuf_to_output_FAST() 584 if (k1 != s->k0) { s->k0 = k1; continue; }; in unRLE_obuf_to_output_FAST() [all …]
|
/freebsd/crypto/openssl/include/openssl/ |
H A D | des.h | 61 # define DES_ecb2_encrypt(i,o,k1,k2,e) \ argument 62 DES_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) 64 # define DES_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ argument 65 DES_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) 67 # define DES_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \ argument 68 DES_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e)) 70 # define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ argument 71 DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
|
/freebsd/tests/sys/kqueue/libkqueue/ |
H A D | main.c | 240 _kevent_cmp(struct kevent *k1, struct kevent *k2, const char *file, int line) in _kevent_cmp() argument 249 if (k1->flags & EV_ADD) in _kevent_cmp() 252 if (k1->ident != k2->ident || k1->filter != k2->filter || in _kevent_cmp() 253 k1->flags != k2->flags || k1->fflags != k2->fflags || in _kevent_cmp() 254 k1->data != k2->data || k1->udata != k2->udata || in _kevent_cmp() 255 k1->ext[0] != k2->ext[0] || k1->ext[1] != k2->ext[1] || in _kevent_cmp() 256 k1->ext[0] != k2->ext[2] || k1->ext[0] != k2->ext[3]) { in _kevent_cmp() 257 kev1_str = kevent_to_str(k1); in _kevent_cmp()
|
/freebsd/crypto/libecc/src/examples/hash/ |
H A D | tdes.c | 239 u32 k1, k2; in des_round() local 241 k1 = (u32)K; in des_round() 244 T = k1 ^ L[0]; in des_round() 288 u32 k1, k2; in des_set_key() local 298 k1 = ((C << 4) & 0x24000000) | ((C << 28) & 0x10000000) in des_set_key() 323 ctx->sk[i] = (((u64)k2) << 32) | (u64)k1; in des_set_key() 326 ctx->sk[15-i] = (((u64)k2) << 32) | (u64)k1; in des_set_key() 383 ATTRIBUTE_WARN_UNUSED_RET int des3_set_keys(des3_context *ctx, const u8 k1[8], const u8 k2[8], cons… in des3_set_keys() 387 if((ctx == NULL) || (k1 == NULL) || (k2 == NULL)){ in des3_set_keys() 393 if(des_set_key(&(ctx->des[0]), k1, DES_ENCRYPTION)){ in des3_set_keys() [all …]
|
/freebsd/crypto/openssl/crypto/cmac/ |
H A D | cmac.c | 27 unsigned char k1[EVP_MAX_BLOCK_LENGTH]; member 39 static void make_kn(unsigned char *k1, const unsigned char *l, int bl) in make_kn() argument 46 k1[i] = (c << 1) | ((cnext = l[i + 1]) >> 7); in make_kn() 49 k1[i] = (c << 1) ^ ((0 - carry) & (bl == 16 ? 0x87 : 0x1b)); in make_kn() 73 OPENSSL_cleanse(ctx->k1, EVP_MAX_BLOCK_LENGTH); in CMAC_CTX_cleanup() 103 memcpy(out->k1, in->k1, bl); in CMAC_CTX_copy() 150 make_kn(ctx->k1, ctx->tbl, bl); in CMAC_Init() 151 make_kn(ctx->k2, ctx->k1, bl); in CMAC_Init() 222 out[i] = ctx->last_block[i] ^ ctx->k1[i]; in CMAC_Final()
|
/freebsd/sys/contrib/libsodium/test/default/ |
H A D | box_easy2.c | 20 unsigned char *k1; in main() local 43 k1 = (unsigned char *) sodium_malloc(crypto_box_BEFORENMBYTES); in main() 79 ret = crypto_box_beforenm(k1, small_order_p, bobsk); in main() 84 ret = crypto_box_beforenm(k1, alicepk, bobsk); in main() 91 if (crypto_box_easy_afternm(c, m, 0, nonce, k1) != 0) { in main() 96 crypto_box_easy_afternm(c, m, (unsigned long long) mlen, nonce, k1); in main() 128 k1); in main() 141 sodium_free(k1); in main()
|
/freebsd/contrib/netbsd-tests/lib/libc/gen/ |
H A D | t_ftok.c | 65 key_t k1, k2, k3; in ATF_TC_BODY() local 75 k1 = ftok(path, key); in ATF_TC_BODY() 79 ATF_REQUIRE(k1 != -1); in ATF_TC_BODY() 83 if (k1 != k2) in ATF_TC_BODY() 86 if (k1 != k3) in ATF_TC_BODY()
|
/freebsd/sys/dev/qat/qat_api/common/crypto/sym/ |
H A D | lac_sym_hash_sw_precomputes.c | 248 Cpa8U k1[LAC_HASH_CMAC_BLOCK_SIZE], in LacSymHash_AesECBPreCompute() local 285 k1[i] = (*ptr) << 1; in LacSymHash_AesECBPreCompute() 287 k1[i - 1] |= in LacSymHash_AesECBPreCompute() 298 k1[i] ^= LAC_SYM_AES_CMAC_RB_128; in LacSymHash_AesECBPreCompute() 305 k2[i] = (k1[i]) << 1; in LacSymHash_AesECBPreCompute() 308 (k1[i]) >> (LAC_NUM_BITS_IN_BYTE - 1); in LacSymHash_AesECBPreCompute() 312 if (k1[0] & LAC_SYM_HASH_MSBIT_MASK) { in LacSymHash_AesECBPreCompute() 319 memcpy(ptr, k1, LAC_HASH_CMAC_BLOCK_SIZE); in LacSymHash_AesECBPreCompute()
|
/freebsd/crypto/openssl/crypto/bn/asm/ |
H A D | rsaz-avx512.pl | 244 vpcmpuq \$1, $_R0, $mask52x4, %k1 # OP=lt 249 kmovb %k1, %r14d # k1 256 vpcmpuq \$0, $_R0, $mask52x4, %k1 # OP=eq 261 kmovb %k1, %r9d # k4 291 kmovb %r14d, %k1 300 vpsubq $mask52x4, $_R0, ${_R0}{%k1} 569 vpcmpq \$0, $cur_idx, $idx, %k1 # mask of (idx == cur_idx) 577 vpblendmq $tmp0, $t0, ${t0}{%k1} # extract data when mask is not zero 578 vpblendmq $tmp1, $t1, ${t1}{%k1} 579 vpblendmq $tmp2, $t2, ${t2}{%k1} [all …]
|
/freebsd/sys/crypto/openssl/amd64/ |
H A D | rsaz-avx512.S | 324 vpcmpuq $1,%ymm1,%ymm4,%k1 329 kmovb %k1,%r14d 336 vpcmpuq $0,%ymm1,%ymm4,%k1 341 kmovb %k1,%r9d 371 kmovb %r14d,%k1 380 vpsubq %ymm4,%ymm1,%ymm1{%k1} 627 vpcmpuq $1,%ymm1,%ymm4,%k1 632 kmovb %k1,%r14d 639 vpcmpuq $0,%ymm1,%ymm4,%k1 644 kmovb %k1,%r9d [all …]
|
/freebsd/contrib/wpa/src/crypto/ |
H A D | aes-siv.c | 126 const u8 *k1, *k2; in aes_siv_encrypt() local 136 k1 = key; in aes_siv_encrypt() 146 if (aes_s2v(k1, key_len, num_elem + 1, _addr, _len, v)) in aes_siv_encrypt() 169 const u8 *k1, *k2; in aes_siv_decrypt() local 181 k1 = key; in aes_siv_decrypt() 201 ret = aes_s2v(k1, key_len, num_elem + 1, _addr, _len, check); in aes_siv_decrypt()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/ |
H A D | Hashing.h | 154 static constexpr uint64_t k1 = 0xb492b66fbe98f273ULL; variable 202 uint64_t a = fetch64(s) * k1; in hash_17to32_bytes() 261 hash_16_bytes(seed, k1), in create() 262 llvm::rotr<uint64_t>(seed ^ k1, 49), in create() 263 seed * k1, in create() 287 h0 = llvm::rotr<uint64_t>(h0 + h1 + h3 + fetch64(s + 8), 37) * k1; in mix() 288 h1 = llvm::rotr<uint64_t>(h1 + h4 + fetch64(s + 48), 42) * k1; in mix() 291 h2 = llvm::rotr<uint64_t>(h2 + h5, 33) * k1; in mix() 292 h3 = h4 * k1; in mix() 304 return hash_16_bytes(hash_16_bytes(h3, h5) + shift_mix(h1) * k1 + h2, in finalize() [all …]
|
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/ |
H A D | shorthash_siphash24_ref.c | 16 uint64_t k1 = LOAD64_LE(k + 8); in crypto_shorthash_siphash24() local 22 v3 ^= k1; in crypto_shorthash_siphash24() 24 v1 ^= k1; in crypto_shorthash_siphash24()
|
H A D | shorthash_siphashx24_ref.c | 15 uint64_t k1 = LOAD64_LE(k + 8); in crypto_shorthash_siphashx24() local 21 v3 ^= k1; in crypto_shorthash_siphashx24() 23 v1 ^= k1; in crypto_shorthash_siphashx24()
|
/freebsd/contrib/unbound/util/storage/ |
H A D | dnstree.h | 212 int name_tree_compare(const void* k1, const void* k2); 215 int addr_tree_compare(const void* k1, const void* k2); 218 int addr_tree_addrport_compare(const void* k1, const void* k2);
|
H A D | dnstree.c | 47 int name_tree_compare(const void* k1, const void* k2) in name_tree_compare() argument 49 struct name_tree_node* x = (struct name_tree_node*)k1; in name_tree_compare() 60 int addr_tree_compare(const void* k1, const void* k2) in addr_tree_compare() argument 62 struct addr_tree_node* n1 = (struct addr_tree_node*)k1; in addr_tree_compare() 74 int addr_tree_addrport_compare(const void* k1, const void* k2) in addr_tree_addrport_compare() argument 76 struct addr_tree_node* n1 = (struct addr_tree_node*)k1; in addr_tree_addrport_compare()
|
/freebsd/sys/sys/ |
H A D | umtxvar.h | 193 umtx_key_match(const struct umtx_key *k1, const struct umtx_key *k2) in umtx_key_match() argument 196 return (k1->type == k2->type && in umtx_key_match() 197 k1->info.both.a == k2->info.both.a && in umtx_key_match() 198 k1->info.both.b == k2->info.both.b); in umtx_key_match()
|
/freebsd/contrib/libucl/src/ |
H A D | ucl_hash.c | 109 ucl_hash_equal (const ucl_object_t *k1, const ucl_object_t *k2) in ucl_hash_equal() argument 111 if (k1->keylen == k2->keylen) { in ucl_hash_equal() 112 return memcmp (k1->key, k2->key, k1->keylen) == 0; in ucl_hash_equal() 183 ucl_hash_caseless_equal (const ucl_object_t *k1, const ucl_object_t *k2) in ucl_hash_caseless_equal() argument 185 if (k1->keylen == k2->keylen) { in ucl_hash_caseless_equal() 187 const char *s = k1->key, *d = k2->key; in ucl_hash_caseless_equal() 193 size_t leftover = k1->keylen % 4; in ucl_hash_caseless_equal() 195 fp = k1->keylen - leftover; in ucl_hash_caseless_equal()
|
/freebsd/tools/tools/kernxref/ |
H A D | kernxref.sh | 20 SORTORDER=-k1 49 SORTORDER=-k1
|
/freebsd/crypto/openssh/ |
H A D | umac.c | 344 UINT32 k0,k1,k2,k3,k4,k5,k6,k7; in nh_aux() local 352 k0 = *(k+0); k1 = *(k+1); k2 = *(k+2); k3 = *(k+3); in nh_aux() 355 h += MUL64((k1 + d1), (k5 + d5)); in nh_aux() 377 UINT32 k0,k1,k2,k3,k4,k5,k6,k7, in nh_aux() local 382 k0 = *(k+0); k1 = *(k+1); k2 = *(k+2); k3 = *(k+3); in nh_aux() 394 h1 += MUL64((k1 + d1), (k5 + d5)); in nh_aux() 403 k0 = k8; k1 = k9; k2 = k10; k3 = k11; in nh_aux() 424 UINT32 k0,k1,k2,k3,k4,k5,k6,k7, in nh_aux() local 430 k0 = *(k+0); k1 = *(k+1); k2 = *(k+2); k3 = *(k+3); in nh_aux() 444 h1 += MUL64((k1 + d1), (k5 + d5)); in nh_aux() [all …]
|