func crypto/internal/fips140/bigmod.NewNat
82 uses
crypto/internal/fips140/bigmod (current package)
nat.go#L71: func NewNat() *Nat {
nat.go#L482: rr := NewNat().ExpandFor(m)
nat.go#L552: n := NewNat().resetToBytes(b)
nat.go#L561: x := NewNat().resetToBytes(a)
nat.go#L562: y := NewNat().resetToBytes(b)
nat.go#L563: n := NewNat().reset(len(x.limbs) + len(y.limbs))
nat.go#L597: n := NewNat()
nat.go#L608: d := NewNat().resetFor(m)
nat.go#L700: t := NewNat().set(x)
nat.go#L717: t := NewNat().set(x)
nat.go#L727: one := NewNat().ExpandFor(m)
nat.go#L767: one := NewNat().ExpandFor(m)
nat.go#L928: xR := NewNat().set(x).montgomeryRepresentation(m) // xR = x * R mod m
nat.go#L999: NewNat(), NewNat(), NewNat(), NewNat(), NewNat(),
nat.go#L1000: NewNat(), NewNat(), NewNat(), NewNat(), NewNat(),
nat.go#L1001: NewNat(), NewNat(), NewNat(), NewNat(), NewNat(),
nat.go#L1011: tmp := NewNat().ExpandFor(m)
nat.go#L1049: xR := NewNat().set(x).montgomeryRepresentation(m)
nat.go#L1129: u = NewNat().set(a).expand(size)
nat.go#L1130: v := NewNat().set(m).expand(size)
nat.go#L1132: A = NewNat().reset(len(m.limbs))
nat.go#L1134: B := NewNat().reset(len(a.limbs))
nat.go#L1135: C := NewNat().reset(len(m.limbs))
nat.go#L1136: D := NewNat().reset(len(a.limbs))
crypto/internal/fips140/ecdsa
ecdsa.go#L79: two, _ := bigmod.NewNat().SetBytes([]byte{2}, c.N)
ecdsa.go#L80: c.nMinus2 = bigmod.NewNat().ExpandFor(c.N).Sub(two, c.N).Bytes(c.N)
ecdsa.go#L165: d, err := bigmod.NewNat().SetBytes(D, c.N)
ecdsa.go#L242: if k, err := bigmod.NewNat().SetBytes(b, c.N); err == nil && k.IsZero() == 0 {
ecdsa.go#L313: e := bigmod.NewNat()
ecdsa.go#L330: kInv := bigmod.NewNat()
ecdsa.go#L337: r, err := bigmod.NewNat().SetOverflowingBytes(Rx, c.N)
ecdsa.go#L349: e := bigmod.NewNat()
ecdsa.go#L352: s, err := bigmod.NewNat().SetBytes(priv.d, c.N)
ecdsa.go#L449: r, err := bigmod.NewNat().SetBytes(sig.R, c.N)
ecdsa.go#L456: s, err := bigmod.NewNat().SetBytes(sig.S, c.N)
ecdsa.go#L464: e := bigmod.NewNat()
ecdsa.go#L468: w := bigmod.NewNat()
ecdsa.go#L487: 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#L153: gcd, err := bigmod.NewNat().GCDVarTime(a, b)
keygen.go#L387: b := bigmod.NewNat()
keygen.go#L401: 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#L366: m, err := bigmod.NewNat().SetBytes(plaintext, pub.N)
rsa.go#L370: return bigmod.NewNat().ExpShortVarTime(m, uint(pub.E), pub.N).Bytes(pub.N), nil
rsa.go#L404: c, err := bigmod.NewNat().SetBytes(ciphertext, N)
rsa.go#L412: m = bigmod.NewNat().Exp(c, priv.d.Bytes(N), N)
rsa.go#L416: t0 := bigmod.NewNat()
rsa.go#L418: m = bigmod.NewNat().Exp(t0.Mod(c, P), priv.dP, P)
rsa.go#L420: m2 := bigmod.NewNat().Exp(t0.Mod(c, Q), priv.dQ, Q)
rsa.go#L432: c1 := bigmod.NewNat().ExpShortVarTime(m, uint(E), N)