Home | History | Annotate | Download | only in rsa

Lines Matching refs:precomputed

67 	// Precomputed contains precomputed values that speed up private
69 Precomputed PrecomputedValues
132 // CRTValue contains the precomputed Chinese remainder theorem values.
403 if priv.Precomputed.Dp != nil {
407 priv.Precomputed.Dp = new(big.Int).Sub(priv.Primes[0], bigOne)
408 priv.Precomputed.Dp.Mod(priv.D, priv.Precomputed.Dp)
410 priv.Precomputed.Dq = new(big.Int).Sub(priv.Primes[1], bigOne)
411 priv.Precomputed.Dq.Mod(priv.D, priv.Precomputed.Dq)
413 priv.Precomputed.Qinv = new(big.Int).ModInverse(priv.Primes[1], priv.Primes[0])
416 priv.Precomputed.CRTValues = make([]CRTValue, len(priv.Primes)-2)
419 values := &priv.Precomputed.CRTValues[i-2]
471 if priv.Precomputed.Dp == nil {
475 m = new(big.Int).Exp(c, priv.Precomputed.Dp, priv.Primes[0])
476 m2 := new(big.Int).Exp(c, priv.Precomputed.Dq, priv.Primes[1])
481 m.Mul(m, priv.Precomputed.Qinv)
486 for i, values := range priv.Precomputed.CRTValues {