UNPKG

jwk-rsa-compute-primes

Version:

Compute p, q, dp, dq, and qi from e, d, and n for private JWKs without these parameters

13 lines (12 loc) 253 B
import * as BN from 'bn.js'; /** * Calculate primes using e, d, and n. * @param e * @param d * @param n * @return the two primes used. p will be greater than q. */ export declare function factor(e: any, d: any, n: any): { p: BN; q: BN; };