/freebsd/crypto/openssl/providers/implementations/digests/ |
H A D | sha3_prov.c | 203 #define SHA3_newctx(typ, uname, name, bitlen, pad) \ argument 212 ossl_sha3_init(ctx, pad, bitlen); \ 217 #define KMAC_newctx(uname, bitlen, pad) \ argument 226 ossl_keccak_kmac_init(ctx, pad, bitlen); \ 231 #define PROV_FUNC_SHA3_DIGEST_COMMON(name, bitlen, blksize, dgstsize, flags) \ argument 241 #define PROV_FUNC_SHA3_DIGEST(name, bitlen, blksize, dgstsize, flags) \ argument 242 PROV_FUNC_SHA3_DIGEST_COMMON(name, bitlen, blksize, dgstsize, flags), \ 246 #define PROV_FUNC_SHAKE_DIGEST(name, bitlen, blksize, dgstsize, flags) \ argument 247 PROV_FUNC_SHA3_DIGEST_COMMON(name, bitlen, blksize, dgstsize, flags), \ 300 #define IMPLEMENT_SHA3_functions(bitlen) \ argument [all …]
|
/freebsd/crypto/openssl/crypto/evp/ |
H A D | legacy_sha.c | 196 #define EVP_MD_SHA3(bitlen) \ argument 197 const EVP_MD *EVP_sha3_##bitlen(void) \ 199 static const EVP_MD sha3_##bitlen##_md = { \ 200 NID_sha3_##bitlen, \ 201 NID_RSA_SHA3_##bitlen, \ 202 bitlen / 8, \ 207 (KECCAK1600_WIDTH - bitlen * 2) / 8), \ 209 return &sha3_##bitlen##_md; \ 211 #define EVP_MD_SHAKE(bitlen) \ argument 212 const EVP_MD *EVP_shake##bitlen(void) \ [all …]
|
H A D | e_aes_cbc_hmac_sha1.c | 490 unsigned int res, maxpad, pad, bitlen; in aesni_cbc_hmac_sha1_cipher() local 590 bitlen = key->md.Nl + (inp_len << 3); /* at most 18 bits */ in aesni_cbc_hmac_sha1_cipher() 592 bitlen = BSWAP4(bitlen); in aesni_cbc_hmac_sha1_cipher() 595 mac.c[1] = (unsigned char)(bitlen >> 16); in aesni_cbc_hmac_sha1_cipher() 596 mac.c[2] = (unsigned char)(bitlen >> 8); in aesni_cbc_hmac_sha1_cipher() 597 mac.c[3] = (unsigned char)bitlen; in aesni_cbc_hmac_sha1_cipher() 598 bitlen = mac.u[0]; in aesni_cbc_hmac_sha1_cipher() 619 data->u[SHA_LBLOCK - 1] |= bitlen & mask; in aesni_cbc_hmac_sha1_cipher() 635 data->u[SHA_LBLOCK - 1] |= bitlen & mask; in aesni_cbc_hmac_sha1_cipher() 647 data->u[SHA_LBLOCK - 1] = bitlen; in aesni_cbc_hmac_sha1_cipher()
|
H A D | e_aes_cbc_hmac_sha256.c | 523 unsigned int res, maxpad, pad, bitlen; in aesni_cbc_hmac_sha256_cipher() local 578 bitlen = key->md.Nl + (inp_len << 3); /* at most 18 bits */ in aesni_cbc_hmac_sha256_cipher() 580 bitlen = BSWAP4(bitlen); in aesni_cbc_hmac_sha256_cipher() 583 mac.c[1] = (unsigned char)(bitlen >> 16); in aesni_cbc_hmac_sha256_cipher() 584 mac.c[2] = (unsigned char)(bitlen >> 8); in aesni_cbc_hmac_sha256_cipher() 585 mac.c[3] = (unsigned char)bitlen; in aesni_cbc_hmac_sha256_cipher() 586 bitlen = mac.u[0]; in aesni_cbc_hmac_sha256_cipher() 610 data->u[SHA_LBLOCK - 1] |= bitlen & mask; in aesni_cbc_hmac_sha256_cipher() 629 data->u[SHA_LBLOCK - 1] |= bitlen & mask; in aesni_cbc_hmac_sha256_cipher() 644 data->u[SHA_LBLOCK - 1] = bitlen; in aesni_cbc_hmac_sha256_cipher()
|
/freebsd/crypto/openssl/include/internal/ |
H A D | sha3.h | 19 # define SHA3_MDSIZE(bitlen) (bitlen / 8) argument 20 # define KMAC_MDSIZE(bitlen) 2 * (bitlen / 8) argument 21 # define SHA3_BLOCKSIZE(bitlen) (KECCAK1600_WIDTH - bitlen * 2) / 8 argument 45 int ossl_sha3_init(KECCAK1600_CTX *ctx, unsigned char pad, size_t bitlen); 47 size_t bitlen);
|
/freebsd/crypto/openssl/crypto/pem/ |
H A D | pvkfmt.c | 249 unsigned int ossl_blob_length(unsigned bitlen, int isdss, int ispub) in ossl_blob_length() argument 251 unsigned int nbyte = (bitlen + 7) >> 3; in ossl_blob_length() 252 unsigned int hnbyte = (bitlen + 15) >> 4; in ossl_blob_length() 286 unsigned int bitlen, magic; in do_b2i_key() local 289 if (ossl_do_blob_header(&p, length, &magic, &bitlen, isdss, ispub) <= 0) { in do_b2i_key() 294 if (length < ossl_blob_length(bitlen, *isdss, *ispub)) { in do_b2i_key() 299 key = ossl_b2i_RSA_after_header(&p, bitlen, *ispub); in do_b2i_key() 302 key = ossl_b2i_DSA_after_header(&p, bitlen, *ispub); in do_b2i_key() 325 unsigned int bitlen, magic, length; in ossl_b2i_bio() local 335 if (ossl_do_blob_header(&p, 16, &magic, &bitlen, &isdss, ispub) <= 0) in ossl_b2i_bio() [all …]
|
/freebsd/contrib/bearssl/src/ec/ |
H A D | ecdsa_i15_bits.c | 32 uint32_t bitlen, hbitlen; in br_ecdsa_i15_bits2int() local 35 bitlen = ebitlen - (ebitlen >> 4); in br_ecdsa_i15_bits2int() 37 if (hbitlen > bitlen) { in br_ecdsa_i15_bits2int() 38 len = (bitlen + 7) >> 3; in br_ecdsa_i15_bits2int() 39 sc = (int)((hbitlen - bitlen) & 7); in br_ecdsa_i15_bits2int()
|
H A D | ecdsa_i31_bits.c | 32 uint32_t bitlen, hbitlen; in br_ecdsa_i31_bits2int() local 35 bitlen = ebitlen - (ebitlen >> 5); in br_ecdsa_i31_bits2int() 37 if (hbitlen > bitlen) { in br_ecdsa_i31_bits2int() 38 len = (bitlen + 7) >> 3; in br_ecdsa_i31_bits2int() 39 sc = (int)((hbitlen - bitlen) & 7); in br_ecdsa_i31_bits2int()
|
/freebsd/contrib/ofed/libibmad/ |
H A D | fields.c | 1152 int postbits = (f->bitoffs + f->bitlen) & 7; in _set_field() 1153 int bytelen = f->bitlen / 8; in _set_field() 1157 if (!bytelen && (f->bitoffs & 7) + f->bitlen < 8) { in _set_field() 1158 p[3 ^ idx] &= ~((((1 << f->bitlen) - 1)) << (f->bitoffs & 7)); in _set_field() 1160 (val & ((1 << f->bitlen) - 1)) << (f->bitoffs & 7); in _set_field() 1183 int postbits = (f->bitoffs + f->bitlen) & 7; in _get_field() 1184 int bytelen = f->bitlen / 8; in _get_field() 1189 if (!bytelen && (f->bitoffs & 7) + f->bitlen < 8) in _get_field() 1190 return (p[3 ^ idx] >> (f->bitoffs & 7)) & ((1 << f->bitlen) - in _get_field() 1197 i = base_offs + (f->bitoffs + f->bitlen) / 8; in _get_field() [all …]
|
/freebsd/crypto/openssl/crypto/sha/ |
H A D | sha3.c | 21 int ossl_sha3_init(KECCAK1600_CTX *ctx, unsigned char pad, size_t bitlen) in ossl_sha3_init() argument 23 size_t bsz = SHA3_BLOCKSIZE(bitlen); in ossl_sha3_init() 28 ctx->md_size = bitlen / 8; in ossl_sha3_init() 36 int ossl_keccak_kmac_init(KECCAK1600_CTX *ctx, unsigned char pad, size_t bitlen) in ossl_keccak_kmac_init() argument 38 int ret = ossl_sha3_init(ctx, pad, bitlen); in ossl_keccak_kmac_init()
|
/freebsd/crypto/openssl/providers/implementations/encode_decode/ |
H A D | decode_msblob2key.c | 34 typedef void *b2i_of_void_fn(const unsigned char **in, unsigned int bitlen, 102 unsigned int bitlen, magic, length; in msblob2key_decode() local 117 ok = ossl_do_blob_header(&p, 16, &magic, &bitlen, &isdss, &ispub) > 0; in msblob2key_decode() 129 length = ossl_blob_length(bitlen, isdss, ispub); in msblob2key_decode() 155 key = ctx->desc->read_private_key(&p, bitlen, ispub); in msblob2key_decode() 164 key = ctx->desc->read_public_key(&p, bitlen, ispub); in msblob2key_decode()
|
/freebsd/crypto/openssl/include/crypto/ |
H A D | pem.h | 25 unsigned int ossl_blob_length(unsigned bitlen, int isdss, int ispub); 31 DSA *ossl_b2i_DSA_after_header(const unsigned char **in, unsigned int bitlen, 34 RSA *ossl_b2i_RSA_after_header(const unsigned char **in, unsigned int bitlen,
|
/freebsd/crypto/openssl/crypto/whrlpool/ |
H A D | wp_dgst.c | 104 c->bitlen[0] += bits; in WHIRLPOOL_BitUpdate() 105 if (c->bitlen[0] < bits) { /* overflow */ in WHIRLPOOL_BitUpdate() 108 c->bitlen[n]++; in WHIRLPOOL_BitUpdate() 109 } while (c->bitlen[n] == 0 in WHIRLPOOL_BitUpdate() 240 for (v = c->bitlen[i], j = 0; j < sizeof(size_t); j++, v >>= 8) in WHIRLPOOL_Final()
|
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_hash/sha512/cp/ |
H A D | hash_sha512_cp.c | 214 uint64_t bitlen[2]; in crypto_hash_sha512_update() local 223 bitlen[1] = ((uint64_t) inlen) << 3; in crypto_hash_sha512_update() 224 bitlen[0] = ((uint64_t) inlen) >> 61; in crypto_hash_sha512_update() 226 if ((state->count[1] += bitlen[1]) < bitlen[1]) { in crypto_hash_sha512_update() 230 state->count[0] += bitlen[0]; in crypto_hash_sha512_update()
|
/freebsd/contrib/tcpdump/ |
H A D | print-domain.c | 81 int bitlen, bytelen; in ns_nskip() local 87 if ((bitlen = GET_U_1(cp)) == 0) in ns_nskip() 88 bitlen = 256; in ns_nskip() 90 bytelen = (bitlen + 7) / 8; in ns_nskip() 114 u_int bitlen, slen, b; in blabel_print() local 120 if ((bitlen = GET_U_1(cp)) == 0) in blabel_print() 121 bitlen = 256; in blabel_print() 122 slen = (bitlen + 3) / 4; in blabel_print() 127 for (bitp = cp + 1, b = bitlen; bitp < lim && b > 7; b -= 8, bitp++) { in blabel_print() 139 ND_PRINT("/%u]", bitlen); in blabel_print() [all …]
|
/freebsd/crypto/openssl/crypto/bn/ |
H A D | bn_rsa_fips186_4.c | 163 int bitlen; in ossl_bn_rsa_fips186_4_gen_prob_primes() local 177 bitlen = bn_rsa_fips186_5_aux_prime_min_size(nlen); in ossl_bn_rsa_fips186_4_gen_prob_primes() 178 if (bitlen == 0) in ossl_bn_rsa_fips186_4_gen_prob_primes() 184 if (!BN_priv_rand_ex(Xp1i, bitlen, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ODD, in ossl_bn_rsa_fips186_4_gen_prob_primes() 191 if (!BN_priv_rand_ex(Xp2i, bitlen, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ODD, in ossl_bn_rsa_fips186_4_gen_prob_primes()
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_read_support_format_cab.c | 112 unsigned char *bitlen; member 2635 ds->at.bitlen[i] = lzx_br_bits(br, 3); in lzx_read_blocks() 2636 ds->at.freq[ds->at.bitlen[i]]++; in lzx_read_blocks() 2752 unsigned char *at_bitlen = at->bitlen; in lzx_decode_blocks() 2753 unsigned char *lt_bitlen = lt->bitlen; in lzx_decode_blocks() 2754 unsigned char *mt_bitlen = mt->bitlen; in lzx_decode_blocks() 3030 ds->pt.bitlen[i] = lzx_br_bits(br, 4); in lzx_read_pre_tree() 3031 ds->pt.freq[ds->pt.bitlen[i]]++; in lzx_read_pre_tree() 3063 if (!lzx_br_read_ahead(strm, br, ds->pt.bitlen[c]+4)) in lzx_read_bitlen() 3065 lzx_br_consume(br, ds->pt.bitlen[c]); in lzx_read_bitlen() [all …]
|
H A D | archive_read_support_format_lha.c | 106 unsigned char *bitlen; member 2238 ds->pt.bitlen[i++] = 0; in lzh_read_blocks() 2308 lzh_br_consume(br, ds->pt.bitlen[c]); in lzh_read_blocks() 2311 ds->lt.bitlen[i++] = c; in lzh_read_blocks() 2313 lzh_br_consume(br, ds->pt.bitlen[c]); in lzh_read_blocks() 2314 ds->lt.bitlen[i++] = 0; in lzh_read_blocks() 2319 ds->pt.bitlen[c] + n)) { in lzh_read_blocks() 2326 lzh_br_consume(br, ds->pt.bitlen[c]); in lzh_read_blocks() 2332 memset(&(ds->lt.bitlen[i]), 0, c); in lzh_read_blocks() 2366 unsigned char *lt_bitlen = lt->bitlen; in lzh_decode_blocks() [all …]
|
/freebsd/crypto/openssl/crypto/rsa/ |
H A D | rsa_sp800_56b_check.c | 228 int bitlen; in ossl_rsa_check_public_exponent() local 230 bitlen = BN_num_bits(e); in ossl_rsa_check_public_exponent() 231 return (BN_is_odd(e) && bitlen > 16 && bitlen < 257); in ossl_rsa_check_public_exponent() 245 int bitlen = (nbits >> 1) - 100; in ossl_rsa_check_pminusq_diff() local 256 return (BN_num_bits(diff) > bitlen); in ossl_rsa_check_pminusq_diff()
|
/freebsd/sys/crypto/sha2/ |
H A D | sha512c.c | 314 uint64_t bitlen[2]; in SHA512_Update() local 322 bitlen[1] = ((uint64_t)len) << 3; in SHA512_Update() 323 bitlen[0] = ((uint64_t)len) >> 61; in SHA512_Update() 326 if ((ctx->count[1] += bitlen[1]) < bitlen[1]) in SHA512_Update() 328 ctx->count[0] += bitlen[0]; in SHA512_Update()
|
H A D | sha256c.c | 279 uint64_t bitlen; in SHA256_Update() local 287 bitlen = len << 3; in SHA256_Update() 290 ctx->count += bitlen; in SHA256_Update()
|
/freebsd/crypto/openssl/providers/implementations/ciphers/ |
H A D | cipher_aes_cbc_hmac_sha1_hw.c | 450 unsigned int res, maxpad, pad, bitlen; in aesni_cbc_hmac_sha1_cipher() local 511 bitlen = sctx->md.Nl + (inp_len << 3); /* at most 18 bits */ in aesni_cbc_hmac_sha1_cipher() 513 bitlen = BSWAP4(bitlen); in aesni_cbc_hmac_sha1_cipher() 516 mac.c[1] = (unsigned char)(bitlen >> 16); in aesni_cbc_hmac_sha1_cipher() 517 mac.c[2] = (unsigned char)(bitlen >> 8); in aesni_cbc_hmac_sha1_cipher() 518 mac.c[3] = (unsigned char)bitlen; in aesni_cbc_hmac_sha1_cipher() 519 bitlen = mac.u[0]; in aesni_cbc_hmac_sha1_cipher() 540 data->u[SHA_LBLOCK - 1] |= bitlen & mask; in aesni_cbc_hmac_sha1_cipher() 556 data->u[SHA_LBLOCK - 1] |= bitlen & mask; in aesni_cbc_hmac_sha1_cipher() 568 data->u[SHA_LBLOCK - 1] = bitlen; in aesni_cbc_hmac_sha1_cipher()
|
H A D | cipher_aes_cbc_hmac_sha256_hw.c | 492 unsigned int res, maxpad, pad, bitlen; in aesni_cbc_hmac_sha256_cipher() local 547 bitlen = sctx->md.Nl + (inp_len << 3); /* at most 18 bits */ in aesni_cbc_hmac_sha256_cipher() 549 bitlen = BSWAP4(bitlen); in aesni_cbc_hmac_sha256_cipher() 552 mac.c[1] = (unsigned char)(bitlen >> 16); in aesni_cbc_hmac_sha256_cipher() 553 mac.c[2] = (unsigned char)(bitlen >> 8); in aesni_cbc_hmac_sha256_cipher() 554 mac.c[3] = (unsigned char)bitlen; in aesni_cbc_hmac_sha256_cipher() 555 bitlen = mac.u[0]; in aesni_cbc_hmac_sha256_cipher() 579 data->u[SHA_LBLOCK - 1] |= bitlen & mask; in aesni_cbc_hmac_sha256_cipher() 598 data->u[SHA_LBLOCK - 1] |= bitlen & mask; in aesni_cbc_hmac_sha256_cipher() 613 data->u[SHA_LBLOCK - 1] = bitlen; in aesni_cbc_hmac_sha256_cipher()
|
/freebsd/crypto/openssl/providers/implementations/storemgmt/ |
H A D | file_store_any2obj.c | 117 unsigned int bitlen, magic; in msblob2obj_decode() local 142 ok = ossl_do_blob_header(&p, 16, &magic, &bitlen, &isdss, &ispub) > 0; in msblob2obj_decode() 148 mem_want = ossl_blob_length(bitlen, isdss, ispub); in msblob2obj_decode()
|
/freebsd/crypto/openssl/include/openssl/ |
H A D | whrlpool.h | 43 size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)]; member
|