/illumos-gate/usr/src/lib/gss_mechs/mech_dh/dh_common/ |
H A D | generic_key.c | 95 * the supplied modulus and root. To calculate the pair we generate 96 * a random key of the appropriate key length modulo the modulus. 98 * the public key as PublicKey = root^PrivateKey % modulus. This routine 103 char *xmodulus, /* The modulus */ 115 /* Convert the modulus from a hex string to a MINT */ 116 MINT *modulus = mp_xtom(xmodulus); local 152 /* We get the private keys as private key modulo the modulus */ 153 mp_mdiv(sk, modulus, tmp, sk); 156 /* The public key is root^sk % modulus */ 157 mp_pow(root, sk, modulus, p 250 MINT *modulus = mp_xtom(xmodulus); local [all...] |
/illumos-gate/usr/src/cmd/dispadmin/ |
H A D | subr.c | 112 ulong_t modulus; local 171 modulus = numerator - result * htp->hrt_res; 172 if ((twomodulus = 2 * modulus) / 2 == modulus) {
|
/illumos-gate/usr/src/lib/pkcs11/pkcs11_softtoken/common/ |
H A D | softRSA.c | 49 uchar_t modulus[MAX_KEY_ATTR_BUFLEN]; local 51 uint32_t modulus_len = sizeof (modulus); 68 rv = soft_get_public_value(key, CKA_MODULUS, modulus, &modulus_len); 73 k.modulus = modulus; 94 uchar_t modulus[MAX_KEY_ATTR_BUFLEN]; local 100 uint32_t modulus_len = sizeof (modulus); 108 rv = soft_get_private_value(key, CKA_MODULUS, modulus, &modulus_len); 163 k.modulus = modulus; 247 uchar_t modulus[MAX_KEY_ATTR_BUFLEN]; local 337 uchar_t modulus[MAX_KEY_ATTR_BUFLEN]; local 531 uchar_t modulus[MAX_KEY_ATTR_BUFLEN]; local 648 uchar_t modulus[MAX_KEY_ATTR_BUFLEN]; local 826 uchar_t modulus[MAX_KEY_ATTR_BUFLEN]; local 984 uchar_t modulus[MAX_KEY_ATTR_BUFLEN]; local 1183 uchar_t modulus[MAX_KEY_ATTR_BUFLEN]; local [all...] |
H A D | softObject.h | 70 biginteger_t modulus; member in struct:rsa_pub_key 134 biginteger_t modulus; member in struct:rsa_pri_key 396 &((o)->object_class_u.public_key->key_type_u.rsa_pub_key.modulus) 398 &((k)->key_type_u.rsa_pub_key.modulus) 489 &((o)->object_class_u.private_key->key_type_u.rsa_pri_key.modulus) 491 &((k)->key_type_u.rsa_pri_key.modulus)
|
H A D | softAttributeUtil.c | 1306 biginteger_t modulus; local 1325 (void) memset(&modulus, 0x0, sizeof (biginteger_t)); 1428 rv = get_bigint_attr_from_template(&modulus, 1437 if ((modulus.big_value_len < 1439 (modulus.big_value_len > 1577 * Derive modulus_bits attribute from modulus. 1584 modulus.big_value_len)) != BIG_OK) { 1587 modulus.big_value_len)) != BIG_OK) { 1593 bytestring2bignum(&n, modulus.big_value, 1594 modulus 1879 biginteger_t modulus; local [all...] |
H A D | softKeystore.c | 573 * modulus_bits + modulus_len + modulus + 638 * modulus_len + modulus + pubexpo_len + pubexpo + 776 /* modulus_len + modulus */ 965 /* modulus_len + modulus */ 1332 biginteger_t modulus; local 1350 (void) memset(&modulus, 0x0, sizeof (biginteger_t)); 1382 /* modulus */ 1383 if ((rv = soft_unpack_obj_attribute(buf, &modulus, 1387 copy_bigint_attr(&modulus, KEY_PUB_RSA_MOD(pbk)); 1527 /* modulus */ [all...] |
/illumos-gate/usr/src/uts/common/crypto/io/ |
H A D | rsa.c | 372 uchar_t *modulus; local 386 if ((rv = crypto_get_key_attr(key, SUN_CKA_MODULUS, &modulus, 595 uchar_t *modulus; local 601 if ((rv = crypto_get_key_attr(key, SUN_CKA_MODULUS, &modulus, 616 * Output buf len must not be less than RSA modulus size. 657 uchar_t *expo, *modulus; local 677 if ((rv = crypto_get_key_attr(key, SUN_CKA_MODULUS, &modulus, 682 k.modulus = modulus; 741 uchar_t *modulus; local 794 uchar_t *modulus, *prime1, *prime2, *expo1, *expo2, *coef; local 961 uchar_t *modulus; local 1055 uchar_t *dataptr, *modulus; local 1268 uchar_t *sigptr, *modulus; local 1471 uchar_t *sigptr, *modulus; local [all...] |
H A D | dprov.c | 657 static uchar_t modulus[128] = { variable 7350 dprov_attribute_size = sizeof (modulus); 7351 dprov_attribute_value = modulus; 7711 attribute.oa_value = (char *)modulus; 7712 attribute.oa_value_len = sizeof (modulus); 7760 attribute.oa_value = (char *)modulus; 7761 attribute.oa_value_len = sizeof (modulus);
|
/illumos-gate/usr/src/lib/libnsl/key/ |
H A D | gen_dhkeys.c | 127 MINT *modulus = mp_xtom(HEXMODULUS); local 146 mp_mdiv(sk, modulus, tmp, sk); 148 mp_pow(root, sk, modulus, pk); 157 mp_mfree(modulus); 231 * Set the modulus for all our 192bit (algtype=0) Diffie-Hellman operations
|
/illumos-gate/usr/src/lib/pkcs11/pkcs11_kernel/common/ |
H A D | kernelObject.h | 81 biginteger_t modulus; member in struct:rsa_pub_key 131 biginteger_t modulus; member in struct:rsa_pri_key 271 &((o)->object_class_u.public_key->key_type_u.rsa_pub_key.modulus) 273 &((k)->key_type_u.rsa_pub_key.modulus) 343 &((o)->object_class_u.private_key->key_type_u.rsa_pri_key.modulus) 345 &((k)->key_type_u.rsa_pri_key.modulus)
|
H A D | kernelAttributeUtil.c | 1022 biginteger_t modulus; local 1035 (void) memset(&modulus, 0x0, sizeof (biginteger_t)); 1130 rv = get_bigint_attr_from_template(&modulus, 1247 copy_bigint_attr(&modulus, 1330 bigint_attr_cleanup(&modulus); 1396 biginteger_t modulus; local 1415 (void) memset(&modulus, 0x0, sizeof (biginteger_t)); 1532 rv = get_bigint_attr_from_template(&modulus, 1689 copy_bigint_attr(&modulus, KEY_PRI_RSA_MOD(pvk)); 1799 bigint_attr_cleanup(&modulus); [all...] |
/illumos-gate/usr/src/common/crypto/rsa/ |
H A D | rsa_impl.h | 88 BIGNUM n; /* n = p * q (the modulus) */ 102 uchar_t *modulus; /* n */ member in struct:__anon1967
|
H A D | rsa_impl.c | 287 /* g now contains the potential modulus n */ 382 * modulus, n -same- 408 /* Must have modulus bits set */ 416 /* Note: modulus_bits may not be same as (8 * sizeof (modulus)) */ 451 bignum2bytestring(bkey->modulus, &(rsakey.n), modulus_bytes); 500 /* Must have modulus and public exponent set */ 501 if (bkey->modulus_bits == 0 || bkey->modulus == NULL || 505 /* Note: modulus_bits may not be same as (8 * sizeof (modulus)) */ 525 /* Convert public exponent and modulus to big integer format. */ 527 bytestring2bignum(&(rsakey.n), bkey->modulus, modulus_byte [all...] |
/illumos-gate/usr/src/cmd/priocntl/ |
H A D | subr.c | 584 ulong_t modulus; local 642 modulus = numerator - result * htp->hrt_res; 643 if ((twomodulus = 2 * modulus) / 2 == modulus) {
|
/illumos-gate/usr/src/lib/smbsrv/libsmb/common/ |
H A D | smb_auth.c | 604 const uchar_t modulus = 'z' - ' ' + 1; local 618 t = (t % modulus) + start;
|
/illumos-gate/usr/src/lib/pkcs11/pkcs11_tpm/common/ |
H A D | asn1.c | 872 * modulus INTEGER 886 CK_ATTRIBUTE * modulus, 908 modulus->ulValueLen); 964 (CK_BYTE *)modulus + sizeof (CK_ATTRIBUTE), modulus->ulValueLen); 1055 CK_ATTRIBUTE ** modulus, 1247 *modulus = n_attr; 883 ber_encode_RSAPrivateKey(CK_BBOOL length_only, CK_BYTE ** data, CK_ULONG * data_len, CK_ATTRIBUTE * modulus, CK_ATTRIBUTE * publ_exp, CK_ATTRIBUTE * priv_exp, CK_ATTRIBUTE * prime1, CK_ATTRIBUTE * prime2, CK_ATTRIBUTE * exponent1, CK_ATTRIBUTE * exponent2, CK_ATTRIBUTE * coeff) argument 1053 ber_decode_RSAPrivateKey(CK_BYTE * data, CK_ULONG data_len, CK_ATTRIBUTE ** modulus, CK_ATTRIBUTE ** publ_exp, CK_ATTRIBUTE ** priv_exp, CK_ATTRIBUTE ** prime1, CK_ATTRIBUTE ** prime2, CK_ATTRIBUTE ** exponent1, CK_ATTRIBUTE ** exponent2, CK_ATTRIBUTE ** coeff) argument
|
H A D | key.c | 1419 * modulus INTEGER 1435 CK_ATTRIBUTE *modulus = NULL; local 1442 if (template_attribute_find(tmpl, CKA_MODULUS, &modulus) == FALSE) { 1474 modulus, publ_exp, priv_exp, prime1, prime2, 1485 CK_ATTRIBUTE *modulus = NULL; local 1496 &modulus, &publ_exp, &priv_exp, &prime1, &prime2, 1502 (void) remove_leading_zeros(modulus); 1511 (void) template_update_attribute(tmpl, modulus);
|
H A D | tpm_specific.c | 673 * Given a modulus and prime from an RSA key, create a TSS_HKEY object by 804 * modulus and the private exponent and we need the public 825 /* get the modulus */ 851 /* grab the modulus to put into the TSS key object */ 2412 BYTE *buf = NULL, *modulus = NULL; local 2424 * Figure out the modulus size so we can break the data 2428 TSS_TSPATTRIB_KEYINFO_RSA_MODULUS, &modLen, &modulus))) { 2433 /* we don't need the actual modulus */ 2434 Tspi_Context_FreeMemory(hContext, modulus); 2616 BYTE *dataBlob, *modulus; local 2759 BYTE *modulus; local [all...] |
/illumos-gate/usr/src/lib/libkmf/plugins/kmf_pkcs11/common/ |
H A D | pkcs11_spi.c | 1707 CK_BYTE *modulus = NULL; local 1749 modulus = malloc(modulusLength); 1750 if (modulus == NULL) 1753 modattr[0].pValue = modulus; 1758 free(modulus); 1762 IDInput.Data = modulus; 2359 /* Get the modulus length */
|