func crypto/internal/fips140/bigmod.NewNat
83 uses
crypto/internal/fips140/bigmod (current package)
nat.go#L71: func NewNat() *Nat {
nat.go#L481: rr := NewNat().ExpandFor(m)
nat.go#L551: n := NewNat().resetToBytes(b)
nat.go#L560: x := NewNat().resetToBytes(a)
nat.go#L561: y := NewNat().resetToBytes(b)
nat.go#L562: n := NewNat().reset(len(x.limbs) + len(y.limbs))
nat.go#L596: n := NewNat()
nat.go#L607: d := NewNat().resetFor(m)
nat.go#L699: t := NewNat().set(x)
nat.go#L716: t := NewNat().set(x)
nat.go#L726: one := NewNat().ExpandFor(m)
nat.go#L766: one := NewNat().ExpandFor(m)
nat.go#L927: xR := NewNat().set(x).montgomeryRepresentation(m) // xR = x * R mod m
nat.go#L998: NewNat(), NewNat(), NewNat(), NewNat(), NewNat(),
nat.go#L999: NewNat(), NewNat(), NewNat(), NewNat(), NewNat(),
nat.go#L1000: NewNat(), NewNat(), NewNat(), NewNat(), NewNat(),
nat.go#L1010: tmp := NewNat().ExpandFor(m)
nat.go#L1048: xR := NewNat().set(x).montgomeryRepresentation(m)
nat.go#L1128: u = NewNat().set(a).expand(size)
nat.go#L1129: v := NewNat().set(m).expand(size)
nat.go#L1131: A = NewNat().reset(len(m.limbs))
nat.go#L1133: B := NewNat().reset(len(a.limbs))
nat.go#L1134: C := NewNat().reset(len(m.limbs))
nat.go#L1135: D := NewNat().reset(len(a.limbs))
crypto/internal/fips140/ecdsa
ecdsa.go#L78: two, _ := bigmod.NewNat().SetBytes([]byte{2}, c.N)
ecdsa.go#L79: c.nMinus2 = bigmod.NewNat().ExpandFor(c.N).Sub(two, c.N).Bytes(c.N)
ecdsa.go#L164: d, err := bigmod.NewNat().SetBytes(D, c.N)
ecdsa.go#L249: if k, err := bigmod.NewNat().SetBytes(b, c.N); err == nil && k.IsZero() == 0 {
ecdsa.go#L320: e := bigmod.NewNat()
ecdsa.go#L337: kInv := bigmod.NewNat()
ecdsa.go#L344: r, err := bigmod.NewNat().SetOverflowingBytes(Rx, c.N)
ecdsa.go#L356: e := bigmod.NewNat()
ecdsa.go#L359: s, err := bigmod.NewNat().SetBytes(priv.d, c.N)
ecdsa.go#L456: r, err := bigmod.NewNat().SetBytes(sig.R, c.N)
ecdsa.go#L463: s, err := bigmod.NewNat().SetBytes(sig.S, c.N)
ecdsa.go#L471: e := bigmod.NewNat()
ecdsa.go#L475: w := bigmod.NewNat()
ecdsa.go#L494: v, err := bigmod.NewNat().SetOverflowingBytes(Rx, c.N)
crypto/internal/fips140/rsa
cast.go#L51: d, _ := bigmod.NewNat().SetBytes([]byte{
cast.go#L118: qInv, _ := bigmod.NewNat().SetBytes([]byte{
keygen.go#L78: e := bigmod.NewNat().SetUint(65537)
keygen.go#L79: d, ok := bigmod.NewNat().InverseVarTime(e, λ)
keygen.go#L132: gcd, err := bigmod.NewNat().GCDVarTime(a, b)
keygen.go#L224: primes, err := bigmod.NewNat().SetBytes(productOfPrimes, mr.w)
keygen.go#L352: b := bigmod.NewNat()
keygen.go#L366: z := bigmod.NewNat().Exp(b, mr.m, mr.w)
rsa.go#L65: dN, err := bigmod.NewNat().SetBytes(d, n)
rsa.go#L78: dP := bigmod.NewNat().Mod(d, pMinusOneMod).Bytes(pMinusOneMod)
rsa.go#L85: dQ := bigmod.NewNat().Mod(d, qMinusOneMod).Bytes(qMinusOneMod)
rsa.go#L94: qInv := bigmod.NewNat().Mod(q.Nat(), p)
rsa.go#L125: dN, err := bigmod.NewNat().SetBytes(d, n)
rsa.go#L129: qInvNat, err := bigmod.NewNat().SetBytes(qInv, p)
rsa.go#L155: dN, err := bigmod.NewNat().SetBytes(d, n)
rsa.go#L217: pN := bigmod.NewNat().ExpandFor(N)
rsa.go#L221: qN := bigmod.NewNat().ExpandFor(N)
rsa.go#L242: dP, err := bigmod.NewNat().SetBytes(priv.dP, pMinus1)
rsa.go#L246: de := bigmod.NewNat()
rsa.go#L257: dQ, err := bigmod.NewNat().SetBytes(priv.dQ, qMinus1)
rsa.go#L268: qP, err := bigmod.NewNat().SetOverflowingBytes(q.Nat().Bytes(q), p)
rsa.go#L271: qP = bigmod.NewNat().Mod(q.Nat(), p)
rsa.go#L283: diff := bigmod.NewNat()
rsa.go#L284: if qP, err := bigmod.NewNat().SetBytes(q.Nat().Bytes(q), p); err != nil {
rsa.go#L286: pQ, err := bigmod.NewNat().SetBytes(p.Nat().Bytes(p), q)
rsa.go#L386: m, err := bigmod.NewNat().SetBytes(plaintext, pub.N)
rsa.go#L390: return bigmod.NewNat().ExpShortVarTime(m, uint(pub.E), pub.N).Bytes(pub.N), nil
rsa.go#L424: c, err := bigmod.NewNat().SetBytes(ciphertext, N)
rsa.go#L432: m = bigmod.NewNat().Exp(c, priv.d.Bytes(N), N)
rsa.go#L436: t0 := bigmod.NewNat()
rsa.go#L438: m = bigmod.NewNat().Exp(t0.Mod(c, P), priv.dP, P)
rsa.go#L440: m2 := bigmod.NewNat().Exp(t0.Mod(c, Q), priv.dQ, Q)
rsa.go#L452: c1 := bigmod.NewNat().ExpShortVarTime(m, uint(E), N)