Searched refs:modulus (Results 1 - 25 of 33) sorted by relevance

12

/freebsd-13-stable/crypto/openssh/regress/
H A Dssh2putty.sh27 modulus=`
28 openssl rsa -noout -modulus -in $KEYFILE | grep ^Modulus= |
33 echo "rsa2@$PORT:$HOST $public_exponent,$modulus"
/freebsd-13-stable/usr.bin/newkey/
H A Dgeneric.c87 MINT *modulus = mp_xtom(HEXMODULUS); local
101 mp_mdiv(sk, modulus, tmp, sk);
103 mp_pow(root, sk, modulus, pk);
112 mp_mfree(modulus);
/freebsd-13-stable/contrib/telnet/libtelnet/
H A Dpk.c124 MINT *modulus = mp_xtom(HEXMODULUS); local
129 mp_pow(public, secret, modulus, common);
136 mp_mfree(modulus);
164 MINT *modulus = mp_xtom(HEXMODULUS); local
178 mp_mdiv(sk, modulus, tmp, sk);
180 mp_pow(root, sk, modulus, pk);
189 mp_mfree(modulus);
/freebsd-13-stable/contrib/llvm-project/lld/include/lld/Core/
H A DDefinedAtom.h204 Alignment(int v, int m = 0) : value(v), modulus(m) {}
207 uint16_t modulus; member in struct:lld::DefinedAtom::Alignment
210 return (value == rhs.value) && (modulus == rhs.modulus);
/freebsd-13-stable/contrib/unbound/sldns/
H A Dkeyraw.c272 BIGNUM *modulus; local
299 modulus = BN_new();
300 if(!modulus) {
305 (void) BN_bin2bn(key+offset, (int)(len - offset), modulus);
310 BN_free(modulus);
315 rsa->n = modulus;
320 if (!RSA_set0_key(rsa, modulus, exponent, NULL)) {
322 BN_free(modulus);
/freebsd-13-stable/contrib/wpa/src/crypto/
H A Dcrypto_internal-modexp.c91 const u8 *modulus, size_t modulus_len,
108 bignum_set_unsigned_bin(bn_modulus, modulus, modulus_len) < 0)
89 crypto_mod_exp(const u8 *base, size_t base_len, const u8 *power, size_t power_len, const u8 *modulus, size_t modulus_len, u8 *result, size_t *result_len) argument
H A Dcrypto_wolfssl.c1255 mp_int *a, mp_int *modulus, mp_digit mp);
1480 mp_int *modulus = &e->prime; local
1490 ret = mp_montgomery_calc_normalization(&mu, modulus);
1509 if (mp_mulmod(pa->x, &mu, modulus, ta->x) != MP_OKAY ||
1510 mp_mulmod(pa->y, &mu, modulus, ta->y) != MP_OKAY ||
1511 mp_mulmod(pa->z, &mu, modulus, ta->z) != MP_OKAY ||
1512 mp_mulmod(pb->x, &mu, modulus, tb->x) != MP_OKAY ||
1513 mp_mulmod(pb->y, &mu, modulus, tb->y) != MP_OKAY ||
1514 mp_mulmod(pb->z, &mu, modulus, tb->z) != MP_OKAY) {
H A Dcrypto_nettle.c377 const u8 *modulus, size_t modulus_len,
387 mpz_import(bn_modulus, modulus_len, 1, 1, 1, 0, modulus);
375 crypto_mod_exp(const u8 *base, size_t base_len, const u8 *power, size_t power_len, const u8 *modulus, size_t modulus_len, u8 *result, size_t *result_len) argument
H A Dcrypto_gnutls.c363 const u8 *modulus, size_t modulus_len,
374 gcry_mpi_scan(&bn_modulus, GCRYMPI_FMT_USG, modulus, modulus_len,
361 crypto_mod_exp(const u8 *base, size_t base_len, const u8 *power, size_t power_len, const u8 *modulus, size_t modulus_len, u8 *result, size_t *result_len) argument
H A Dcrypto_libtomcrypt.c504 * k = length of modulus in octets (modlen)
638 * k = length of modulus in octets
740 const u8 *modulus, size_t modulus_len,
750 mp_read_unsigned_bin(m, (u8 *) modulus, modulus_len) != CRYPT_OK)
738 crypto_mod_exp(const u8 *base, size_t base_len, const u8 *power, size_t power_len, const u8 *modulus, size_t modulus_len, u8 *result, size_t *result_len) argument
H A Dcrypto.h452 * @modulus: Modulus integer (big endian byte array)
453 * @modulus_len: Length of modulus integer in bytes
458 * This function calculates result = base ^ power mod modulus. modules_len is
459 * used as the maximum size of modulus buffer. It is set to the used size on
468 const u8 *modulus, size_t modulus_len,
540 * crypto_bignum_rand - Create a random number in range of modulus
542 * @m: Bignum; modulus
573 * @c: Bignum; modulus
/freebsd-13-stable/crypto/openssh/
H A Ddh.c156 logit("WARNING: could not open %s (%s), using fixed modulus",
300 dh_new_group_asc(const char *gen, const char *modulus) argument
307 if (BN_hex2bn(&dh_p, modulus) == 0 ||
325 dh_new_group(BIGNUM *gen, BIGNUM *modulus) argument
331 if (!DH_set0_pqg(dh, modulus, NULL, gen)) {
/freebsd-13-stable/crypto/openssl/apps/
H A Ddsa.c42 {"modulus", OPT_MODULUS, '-', "Print the DSA public value"},
69 int i, modulus = 0, pubin = 0, pubout = 0, ret = 1; local
125 modulus = 1;
185 if (modulus) {
H A Drsa.c49 {"modulus", OPT_MODULUS, '-', "Print the RSA key modulus"},
73 int noout = 0, modulus = 0, pubin = 0, pubout = 0, ret = 1; local
140 modulus = 1;
208 if (modulus) {
H A Dreq.c118 {"modulus", OPT_MODULUS, '-', "RSA modulus"},
241 int modulus = 0, multirdn = 0, verify = 0, noout = 0, text = 0; local
340 modulus = 1;
864 if (noout && !text && !modulus && !subject && !pubkey) {
913 if (modulus) {
H A Dx509.c88 {"modulus", OPT_MODULUS, '-', "Print the RSA key modulus"},
172 int x509req = 0, days = DEF_DAYS, modulus = 0, pubkey = 0, pprint = 0; local
345 modulus = ++num;
701 } else if (modulus == i) {
/freebsd-13-stable/crypto/openssl/crypto/ec/asm/
H A Decp_nistz256-armv4.pl233 @ if a+b >= modulus, subtract modulus.
236 @ modulus and then add it back if subtraction borrowed.
253 adds $a0,$a0,$ff @ add synthesized modulus
326 adds $a0,$a0,$ff @ add synthesized modulus
385 @ this is how modulus is conditionally
482 @ if a-b borrows, add modulus.
489 adds $a0,$a0,$ff @ add synthesized modulus
614 # result of multiplication of modulus by "magic" digit [and
616 # be 0], but thanks to special form of modulus an
[all...]
H A Decp_nistz256-sparcv9.pl234 # result of multiplication of modulus by "magic" digit [and
236 # be 0], but thanks to special form of modulus and "magic"
331 ! "other way around", namely subtract modulus from result
332 ! and if it borrowed, add modulus back.
334 subcc @acc[0],-1,@acc[0] ! subtract modulus
350 addcc @acc[0],$carry,@acc[0] ! add modulus or zero
413 ! if a+b >= modulus, subtract modulus.
416 ! modulus and then add it back if subtraction borrowed.
432 addcc @acc[0],$carry,@acc[0] ! add synthesized modulus
[all...]
H A Decp_nistz256-armv8.pl395 # result of multiplication of modulus by "magic" digit [and
397 # be 0], but thanks to special form of modulus and "magic"
464 adds $t0,$acc0,#1 // subs $t0,$acc0,#-1 // tmp = ret-modulus
470 csel $acc0,$acc0,$t0,lo // ret = borrow ? ret : ret-modulus
578 adds $t0,$acc0,#1 // subs $t0,$acc0,#-1 // tmp = ret-modulus
584 csel $acc0,$acc0,$t0,lo // ret = borrow ? ret : ret-modulus
606 adds $t0,$acc0,#1 // subs $t0,$a0,#-1 // tmp = ret-modulus
612 csel $acc0,$acc0,$t0,lo // ret = borrow ? ret : ret-modulus
633 subs $t0,$acc0,#1 // adds $t0,$a0,#-1 // tmp = ret+modulus
639 csel $acc0,$acc0,$t0,eq // ret = borrow ? ret+modulus
[all...]
/freebsd-13-stable/crypto/openssl/crypto/bn/asm/
H A Darmv8-mont.pl225 // Final step. We see if result is larger than modulus, and
226 // if it is, subtract the modulus. But comparison implies
227 // subtraction. So we subtract modulus, see if it borrowed,
907 // Final step. We see if result is larger than modulus, and
908 // if it is, subtract the modulus. But comparison implies
909 // subtraction. So we subtract modulus, see if it borrowed,
1001 // $acc0-7,$carry hold result, $a0-7 hold modulus
1021 // $a0-7 hold result-modulus
1395 // Final step. We see if result is larger than modulus, and
1396 // if it is, subtract the modulus
[all...]
/freebsd-13-stable/contrib/llvm-project/lld/lib/ReaderWriter/YAML/
H A DReaderWriterYAML.cpp464 if (value.modulus == 0) {
467 out << llvm::format("%d mod %d", value.modulus, value.value);
473 value.modulus = 0;
478 unsigned int modulus; local
479 if (modStr.getAsInteger(0, modulus)) {
480 return "malformed alignment modulus";
482 value.modulus = modulus;
491 if (value.modulus >= power) {
492 return "malformed alignment, modulus to
[all...]
/freebsd-13-stable/contrib/ldns/
H A Ddnssec.c420 BIGNUM *modulus; local
450 modulus = BN_new();
451 if(!modulus) {
456 (void) BN_bin2bn(key+offset, (int)(len - offset), modulus);
461 BN_free(modulus);
466 rsa->n = modulus;
470 if (!RSA_set0_key(rsa, modulus, exponent, NULL)) {
472 BN_free(modulus);
/freebsd-13-stable/contrib/ntp/util/
H A Dntp-keygen.c65 * These cryptographic routines are characterized by the prime modulus
123 #define PLEN 512 /* default prime modulus size (bits) */
124 #define ILEN 256 /* default identity modulus size (bits) */
180 u_int modulus = PLEN; /* prime modulus size (bits) */ variable
181 u_int modulus2 = ILEN; /* identity modulus size (bits) */
420 modulus = OPT_VALUE_MODULUS;
998 fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus);
999 rsa = genRsaKeyPair(modulus, _UC("RSA"));
1010 * modulus turn
[all...]
/freebsd-13-stable/contrib/unbound/validator/
H A Dval_secalgo.c1062 SECItem modulus = {siBuffer, NULL, 0}; local
1085 modulus.data = key+offset;
1086 modulus.len = (len - offset);
1091 if(SECITEM_CopyItem(pk->arena, &pk->u.rsa.modulus, &modulus)) {
/freebsd-13-stable/crypto/heimdal/lib/hx509/
H A Dsoftp11.c367 CK_BYTE *modulus = NULL; local
380 "rsa-modulus");
386 modulus = malloc(modulus_len);
387 BN_bn2bin(num, modulus);
390 add_object_attribute(o, 0, CKA_MODULUS, modulus, modulus_len);
394 free(modulus);

Completed in 288 milliseconds

12