Esempio n. 1
0
 function biRSAKeyPair($encryptionExponent, $decryptionExponent, $modulus)
 {
     global $biRadixBits;
     $this->e = biFromString($encryptionExponent, 16);
     $this->d = biFromString($decryptionExponent, 16);
     $this->m = biFromString($modulus, 16);
     // We can do two bytes per digit, so
     // chunkSize = 2 * (number of digits in modulus - 1).
     // Since biHighIndex returns the high index, not the number of digits, 1 has
     // already been subtracted.
     $this->chunkSize = biHighIndex($this->m);
     $this->radix = $biRadixBits;
     //12;
     $this->barrett = new biBarrettMu($this->m);
 }
Esempio n. 2
0
function biFromHex($s)
{
    return biFromString($s, 16);
}