Lines Matching defs:modulus
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);
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, pk);
176 mp_mfree(modulus);
231 * of the given key length using the passed in modulus. The common key
234 * ck = pk ^ sk % modulus
243 char *xmodulus, /* The modulus */
250 MINT *modulus = mp_xtom(xmodulus);
254 /* ck = pk ^ sk % modulus */
255 mp_pow(pk, sk, modulus, ck);
263 mp_mfree(modulus);