| /freebsd/sys/ufs/ufs/ |
| H A D | ufs_bmap.c | 156 ufs2_daddr_t bn, in ufs_bmaparray() argument 188 error = ufs_getlbns(vp, bn, ap, nump); in ufs_bmaparray() 194 if (bn >= 0 && bn < UFS_NDADDR) { in ufs_bmaparray() 195 *bnp = blkptrtodb(ump, DIP(ip, i_db[bn])); in ufs_bmaparray() 196 } else if (bn < 0 && bn >= -UFS_NXADDR) { in ufs_bmaparray() 197 *bnp = blkptrtodb(ump, ip->i_din2->di_extb[-1 - bn]); in ufs_bmaparray() 218 if (IS_SNAPSHOT(ip) && DIP(ip, i_db[bn]) > 0 && in ufs_bmaparray() 219 DIP(ip, i_db[bn]) < ump->um_seqinc) { in ufs_bmaparray() 223 bn * ump->um_seqinc) : -1; in ufs_bmaparray() 225 ufs2_daddr_t bnb = bn; in ufs_bmaparray() [all …]
|
| /freebsd/crypto/openssl/test/ |
| H A D | bntests.pl | 17 sub bn subroutine 33 my $sum = bn($s{'Sum'}); 34 my $a = bn($s{'A'}); 35 my $b = bn($s{'B'}); 39 my $lshift1 = bn($s{'LShift1'}); 40 my $a = bn($s{'A'}); 44 my $lshift = bn($s{'LShift'}); 45 my $a = bn($s{'A'}); 46 my $n = bn($s{'N'}); 50 my $rshift = bn($s{'RShift'}); [all …]
|
| H A D | bn_internal_test.c | 31 BIGNUM *bn = NULL; in test_is_prime_enhanced() local 33 ret = TEST_ptr(bn = BN_new()) in test_is_prime_enhanced() 35 && TEST_true(BN_set_word(bn, 11)) in test_is_prime_enhanced() 37 && TEST_true(ossl_bn_miller_rabin_is_prime(bn, 10, ctx, NULL, 1, in test_is_prime_enhanced() 40 BN_free(bn); in test_is_prime_enhanced() 52 BIGNUM *bn = NULL; in test_is_composite_enhanced() local 54 ret = TEST_ptr(bn = BN_new()) in test_is_composite_enhanced() 56 && TEST_true(BN_set_word(bn, composites[id])) in test_is_composite_enhanced() 57 && TEST_true(ossl_bn_miller_rabin_is_prime(bn, 10, ctx, NULL, 1, in test_is_composite_enhanced() 61 BN_free(bn); in test_is_composite_enhanced()
|
| H A D | bntest.c | 333 BIGNUM *bn = BN_new(); in set_signed_bn() local 335 if (bn == NULL) in set_signed_bn() 337 if (!BN_set_word(bn, value < 0 ? -value : value)) { in set_signed_bn() 338 BN_free(bn); in set_signed_bn() 341 BN_set_negative(bn, value < 0); in set_signed_bn() 342 return bn; in set_signed_bn() 1935 BIGNUM *bn = NULL, *bn2 = NULL; in test_bn2signed() local 1938 if (!TEST_ptr(bn = BN_new()) in test_bn2signed() 1939 || !TEST_true(BN_asc2bn(&bn, test->base10))) in test_bn2signed() 1948 if (!TEST_int_eq(BN_signed_bn2bin(bn, scratch, sizeof(scratch)), in test_bn2signed() [all …]
|
| /freebsd/contrib/less/ |
| H A D | ch.c | 45 #define bufnode_buf(bn) ((struct buf *) bn) argument 81 #define FOR_BUFS(bn) \ argument 82 for (bn = ch_bufhead; bn != END_OF_CHAIN; bn = bn->next) 84 #define BUF_RM(bn) \ argument 85 (bn)->next->prev = (bn)->prev; \ 86 (bn)->prev->next = (bn)->next; 88 #define BUF_INS_HEAD(bn) \ argument 89 (bn)->next = ch_bufhead; \ 90 (bn)->prev = END_OF_CHAIN; \ 91 ch_bufhead->prev = (bn); \ [all …]
|
| /freebsd/sys/fs/ext2fs/ |
| H A D | ext2_bmap.c | 91 ext4_bmapext(struct vnode *vp, int32_t bn, int64_t *bnp, int *runp, int *runb) in ext4_bmapext() argument 107 lbn = bn; in ext4_bmapext() 210 ext2_bmaparray(struct vnode *vp, daddr_t bn, daddr_t *bnp, int *runp, int *runb) in ext2_bmaparray() argument 238 error = ext2_getlbns(vp, bn, ap, nump); in ext2_bmaparray() 244 *bnp = blkptrtodb(ump, ip->i_db[bn]); in ext2_bmaparray() 248 daddr_t bnb = bn; in ext2_bmaparray() 250 for (++bn; bn < EXT2_NDADDR && *runp < maxrun && in ext2_bmaparray() 251 is_sequential(ump, ip->i_db[bn - 1], ip->i_db[bn]); in ext2_bmaparray() 252 ++bn, ++*runp); in ext2_bmaparray() 253 bn = bnb; in ext2_bmaparray() [all …]
|
| /freebsd/contrib/bc/include/ |
| H A D | library.h | 99 #define BCL_CHECK_NUM_GEN(c, bn) \ argument 102 size_t gen_ = BCL_GET_GEN(bn); \ 103 BclNum* ptr_ = BCL_NUM(c, bn); \ 115 #define BCL_CHECK_NUM_VALID(c, bn) \ argument 118 size_t idx_ = BCL_NO_GEN(bn); \ 123 BCL_CHECK_NUM_GEN(c, bn); \ 132 #define BCL_NUM_ARRAY(bn) ((bn)->n.num) argument 139 #define BCL_NUM_ARRAY_NP(bn) ((bn).n.num) argument 146 #define BCL_NUM_NUM(bn) (&(bn)->n) argument 153 #define BCL_NUM_NUM_NP(bn) (&(bn).n) argument [all …]
|
| /freebsd/crypto/openssl/crypto/bn/ |
| H A D | bn_const.c | 24 BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn) in BN_get_rfc2409_prime_768() argument 124 return BN_bin2bn(RFC2409_PRIME_768, sizeof(RFC2409_PRIME_768), bn); in BN_get_rfc2409_prime_768() 136 BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn) in BN_get_rfc2409_prime_1024() argument 268 return BN_bin2bn(RFC2409_PRIME_1024, sizeof(RFC2409_PRIME_1024), bn); in BN_get_rfc2409_prime_1024() 281 BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn) in BN_get_rfc3526_prime_1536() argument 283 return COPY_BN(bn, ossl_bignum_modp_1536_p); in BN_get_rfc3526_prime_1536() 295 BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn) in BN_get_rfc3526_prime_2048() argument 297 return COPY_BN(bn, ossl_bignum_modp_2048_p); in BN_get_rfc3526_prime_2048() 308 BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn) in BN_get_rfc3526_prime_3072() argument 310 return COPY_BN(bn, ossl_bignum_modp_3072_p); in BN_get_rfc3526_prime_3072() [all …]
|
| H A D | bn_conv.c | 119 int BN_hex2bn(BIGNUM **bn, const char *a) in BN_hex2bn() argument 141 if (bn == NULL) in BN_hex2bn() 145 if (*bn == NULL) { in BN_hex2bn() 149 ret = *bn; in BN_hex2bn() 184 *bn = ret; in BN_hex2bn() 191 if (*bn == NULL) in BN_hex2bn() 196 int BN_dec2bn(BIGNUM **bn, const char *a) in BN_dec2bn() argument 217 if (bn == NULL) in BN_dec2bn() 224 if (*bn == NULL) { in BN_dec2bn() 228 ret = *bn; in BN_dec2bn() [all …]
|
| /freebsd/crypto/openssh/regress/unittests/sshbuf/ |
| H A D | test_sshbuf_getput_crypto.c | 36 BIGNUM *bn, *bn2; in sshbuf_getput_crypto_tests() local 81 MKBN(hexbn1, bn); in sshbuf_getput_crypto_tests() 84 ASSERT_INT_EQ(sshbuf_put_bignum2(p1, bn), 0); in sshbuf_getput_crypto_tests() 86 ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), (u_int32_t)BN_num_bytes(bn)); in sshbuf_getput_crypto_tests() 88 BN_free(bn); in sshbuf_getput_crypto_tests() 93 MKBN(hexbn1, bn); in sshbuf_getput_crypto_tests() 97 r = sshbuf_put_bignum2(p1, bn); in sshbuf_getput_crypto_tests() 100 BN_free(bn); in sshbuf_getput_crypto_tests() 105 MKBN(hexbn2, bn); in sshbuf_getput_crypto_tests() 108 ASSERT_INT_EQ(sshbuf_put_bignum2(p1, bn), 0); in sshbuf_getput_crypto_tests() [all …]
|
| /freebsd/crypto/openssh/regress/unittests/bitmap/ |
| H A D | tests.c | 33 BIGNUM *bn; in tests() local 42 bn = BN_new(); in tests() 43 ASSERT_PTR_NE(bn, NULL); in tests() 51 BN_clear(bn); in tests() 57 ASSERT_INT_EQ(BN_set_bit(bn, i), 1); in tests() 61 ASSERT_INT_EQ(BN_set_bit(bn, j), 1); in tests() 65 ASSERT_INT_EQ(BN_set_bit(bn, k), 1); in tests() 71 ASSERT_INT_EQ(BN_is_bit_set(bn, n), in tests() 77 ASSERT_INT_EQ(BN_num_bits(bn), in tests() 79 ASSERT_INT_EQ(BN_num_bytes(bn), in tests() [all …]
|
| /freebsd/usr.sbin/makefs/ffs/ |
| H A D | ufs_bmap.c | 66 ufs_getlbns(struct inode *ip, daddr_t bn, struct indir *ap, int *nump) in ufs_getlbns() argument 78 realbn = bn; in ufs_getlbns() 79 if ((long)bn < 0) in ufs_getlbns() 80 bn = -(long)bn; in ufs_getlbns() 82 assert (bn >= UFS_NDADDR); in ufs_getlbns() 91 bn -= UFS_NDADDR; in ufs_getlbns() 92 for (lbc = 0, i = UFS_NIADDR;; i--, bn -= blockcnt) { in ufs_getlbns() 99 if (bn < blockcnt) in ufs_getlbns() 105 metalbn = -(realbn - bn + UFS_NIADDR - i); in ufs_getlbns() 107 metalbn = -(-realbn - bn + UFS_NIADDR - i); in ufs_getlbns() [all …]
|
| /freebsd/lib/libmp/ |
| H A D | mpasbn.c | 132 mp->bn = BN_new(); in _dtom() 133 if (mp->bn == NULL) in _dtom() 135 BN_ERRCHECK(msg, BN_dec2bn(&mp->bn, s)); in _dtom() 154 BN_ERRCHECK("gcd", BN_gcd(b, mp1->bn, mp2->bn, c)); in mp_gcd() 195 BN_ERRCHECK(msg, BN_add(b, mp1->bn, mp2->bn)); in _madd() 214 return (BN_cmp(mp1->bn, mp2->bn)); in mp_mcmp() 224 return (BN_ucmp(mp1->bn, mp2->bn)); in _mcmpa() 242 BN_ERRCHECK(msg, BN_div(q, r, nmp->bn, dmp->bn, c)); in _mdiv() 268 BN_clear(mp->bn); in _mfree() 269 BN_free(mp->bn); in _mfree() [all …]
|
| /freebsd/crypto/openssl/crypto/ |
| H A D | param_build_set.c | 70 const char *key, const BIGNUM *bn, size_t sz) in ossl_param_build_set_bn_pad() argument 73 return OSSL_PARAM_BLD_push_BN_pad(bld, key, bn, sz); in ossl_param_build_set_bn_pad() 81 return OSSL_PARAM_set_BN(p, bn); in ossl_param_build_set_bn_pad() 87 const char *key, const BIGNUM *bn) in ossl_param_build_set_bn() argument 90 return OSSL_PARAM_BLD_push_BN(bld, key, bn); in ossl_param_build_set_bn() 94 return OSSL_PARAM_set_BN(p, bn) > 0; in ossl_param_build_set_bn() 104 const BIGNUM *bn; in ossl_param_build_set_multi_key_bn() local 108 bn = sk_BIGNUM_const_value(stk, i); in ossl_param_build_set_multi_key_bn() 109 if (bn != NULL && !OSSL_PARAM_BLD_push_BN(bld, names[i], bn)) in ossl_param_build_set_multi_key_bn() 116 bn = sk_BIGNUM_const_value(stk, i); in ossl_param_build_set_multi_key_bn() [all …]
|
| H A D | param_build.c | 30 const BIGNUM *bn; member 194 const BIGNUM *bn, size_t sz, int type) in push_BN() argument 203 if (bn != NULL) { in push_BN() 204 if (type == OSSL_PARAM_UNSIGNED_INTEGER && BN_is_negative(bn)) { in push_BN() 210 n = BN_num_bytes(bn); in push_BN() 219 if (BN_get_flags(bn, BN_FLG_SECURE) == BN_FLG_SECURE) in push_BN() 229 pd->bn = bn; in push_BN() 234 const BIGNUM *bn) in OSSL_PARAM_BLD_push_BN() argument 236 if (bn != NULL && BN_is_negative(bn)) in OSSL_PARAM_BLD_push_BN() 237 return push_BN(bld, key, bn, BN_num_bytes(bn) + 1, in OSSL_PARAM_BLD_push_BN() [all …]
|
| /freebsd/crypto/openssl/apps/ |
| H A D | prime.c | 69 BIGNUM *bn = NULL; in prime_main() local 126 bn = BN_new(); in prime_main() 127 if (bn == NULL) { in prime_main() 131 if (!BN_generate_prime_ex(bn, bits, safe, NULL, NULL, NULL)) { in prime_main() 135 s = hex ? BN_bn2hex(bn) : BN_bn2dec(bn); in prime_main() 147 r = hex ? BN_hex2bn(&bn, argv[0]) : BN_dec2bn(&bn, argv[0]); in prime_main() 154 BN_print(bio_out, bn); in prime_main() 155 r = BN_check_prime(bn, NULL, NULL); in prime_main() 168 BN_free(bn); in prime_main()
|
| /freebsd/crypto/openssl/crypto/asn1/ |
| H A D | x_bignum.c | 96 BIGNUM *bn; in bn_i2c() local 100 bn = (BIGNUM *)*pval; in bn_i2c() 102 if (BN_num_bits(bn) & 0x7) in bn_i2c() 109 BN_bn2bin(bn, cont); in bn_i2c() 111 return pad + BN_num_bytes(bn); in bn_i2c() 117 BIGNUM *bn; in bn_c2i() local 121 bn = (BIGNUM *)*pval; in bn_c2i() 122 if (!BN_bin2bn(cont, len, bn)) { in bn_c2i() 133 BIGNUM *bn; in bn_secure_c2i() local 143 bn = (BIGNUM *)*pval; in bn_secure_c2i() [all …]
|
| /freebsd/crypto/openssl/test/testutil/ |
| H A D | format_output.c | 183 static const char *test_bignum_zero_null(const BIGNUM *bn) in test_bignum_zero_null() argument 185 if (bn != NULL) in test_bignum_zero_null() 186 return BN_is_negative(bn) ? "-0" : "0"; in test_bignum_zero_null() 194 static void test_bignum_zero_print(const BIGNUM *bn, char sep) in test_bignum_zero_print() argument 196 const char *v = test_bignum_zero_null(bn); in test_bignum_zero_print() 197 const char *suf = bn != NULL ? ": 0" : ""; in test_bignum_zero_print() 207 char *out, int *lz, const BIGNUM *bn) in convert_bn_memory() argument 213 if (bn != NULL && !BN_is_zero(bn)) { in convert_bn_memory() 227 if ((in[bytes] & 0xf0) != 0 && BN_is_negative(bn)) { in convert_bn_memory() 234 if (BN_is_negative(bn)) { in convert_bn_memory() [all …]
|
| /freebsd/crypto/openssl/providers/ |
| H A D | fips.module.sources | 45 crypto/bn/asm/alpha-mont.pl 46 crypto/bn/asm/armv4-gf2m.pl 47 crypto/bn/asm/armv4-mont.pl 48 crypto/bn/asm/armv8-mont.pl 49 crypto/bn/asm/bn-586.pl 50 crypto/bn/asm/c64xplus-gf2m.pl 51 crypto/bn/asm/co-586.pl 52 crypto/bn/asm/ia64-mont.pl 53 crypto/bn/asm/ia64.S 54 crypto/bn/asm/mips-mont.pl [all …]
|
| H A D | fips-sources.checksums | 45 819c9fd2b0cae9aab81c3cbd1815c2e22949d75f132f649b5883812d0bbaa39a crypto/bn/asm/alpha-mont.pl 46 565edec9b6fa0702c07ab2f7507b0a45fb2ab649ed509fd79013ea7378bb5891 crypto/bn/asm/armv4-gf2m.pl 47 5469ab174b62361c6ced8f5c1007c462700761c1aae72f0d2928ca39e57d47a1 crypto/bn/asm/armv4-mont.pl 48 1a2c890bcb9d96b24ef025c4894f89c56e83c05eb0db9532ba3b17a50753c2c2 crypto/bn/asm/armv8-mont.pl 49 cb4ad7b7461fcb8e2a0d52881158d0211b79544842d4eae36fc566869a2d62c8 crypto/bn/asm/bn-586.pl 50 636da7e2a66272a81f9c99e90b36c6f132ad6236c739e8b9f2e7315f30b72edd crypto/bn/asm/c64xplus-gf2m.pl 51 c86664fb974362ee52a454c83c2c4b23fd5b7d64b3c9e23ef1e0dfd130a46ee5 crypto/bn/asm/co-586.pl 52 199b9b100f194a2a128c14f2a71be5a04d50d069666d90ca5b69baee1318ccb7 crypto/bn/asm/ia64-mont.pl 53 a511aafbf76647a0c83705d4491c898a5584d300aa449fa6166c8803372946eb crypto/bn/asm/ia64.S 54 687c5d6606fdfd0e242005972d15db74a9cbac2b8a9a54a56fcb1e99d3880ff3 crypto/bn/asm/mips-mont.pl [all …]
|
| /freebsd/usr.sbin/makefs/msdos/ |
| H A D | msdosfs_lookup.c | 83 daddr_t bn; in createde() local 119 &bn, &dirclust, &blsize); in createde() 125 if ((error = bread((void *)pmp->pm_devvp, bn, blsize, NOCRED, in createde() 151 &bn, 0, &blsize); in createde() 155 error = bread((void *)pmp->pm_devvp, bn, blsize, in createde() 203 daddr_t bn; in m_readep() local 210 bn = detobn(pmp, dirclust, diroffset); in m_readep() 211 if ((error = bread((void *)pmp->pm_devvp, bn, blsize, NOCRED, in m_readep() 245 daddr_t bn; in uniqdosname() local 265 if ((error = pcbmap(dep, cn, &bn, 0, &blsize)) != 0) { in uniqdosname() [all …]
|
| H A D | msdosfs_fat.c | 97 u_long bn, size; in fatblock() local 99 bn = ofs / pmp->pm_fatblocksize * pmp->pm_fatblocksec; in fatblock() 100 size = MIN(pmp->pm_fatblocksec, pmp->pm_FATsecs - bn) in fatblock() 102 bn += pmp->pm_fatblk + pmp->pm_curfat * pmp->pm_FATsecs; in fatblock() 105 *bnp = bn; in fatblock() 139 u_long bn; in pcbmap() local 201 fatblock(pmp, byteoffset, &bn, &bsize, &bo); in pcbmap() 202 if (bn != bp_bn) { in pcbmap() 205 error = bread((void *)pmp->pm_devvp, bn, bsize, in pcbmap() 211 bp_bn = bn; in pcbmap() [all …]
|
| /freebsd/sys/contrib/openzfs/.github/workflows/scripts/ |
| H A D | replace-dupes-with-symlinks.sh | 20 bn="$(basename $line)" 21 if [ -z "${db[$bn]}" ] ; then 23 db[$bn]="$line" 25 if diff -b "$line" "${db[$bn]}" &>/dev/null ; then 28 ln -sr "${db[$bn]}" "$line"
|
| /freebsd/crypto/openssl/doc/man3/ |
| H A D | DH_get_1024_160.pod | 33 BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn); 34 BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn); 35 BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn); 36 BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn); 37 BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn); 38 BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn); 39 BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn); 40 BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn); 70 return a BIGNUM for the specified size from IETF RFC 2409. If B<bn>
|
| /freebsd/sys/fs/msdosfs/ |
| H A D | msdosfs_fat.c | 91 u_long bn, size, fatblocksec; in fatblock() local 99 bn = ofs / pmp->pm_fatblocksize * pmp->pm_fatblocksec; in fatblock() 100 size = roundup(ulmin(fatblocksec, pmp->pm_FATsecs - bn) * DEV_BSIZE, in fatblock() 102 bn += pmp->pm_fatblk + pmp->pm_curfat * pmp->pm_FATsecs; in fatblock() 105 *bnp = bn; in fatblock() 139 u_long bn; in pcbmap() local 203 fatblock(pmp, byteoffset, &bn, &bsize, &bo); in pcbmap() 204 if (bn != bp_bn) { in pcbmap() 207 error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp); in pcbmap() 211 bp_bn = bn; in pcbmap() [all …]
|