math/big.Int.Cmp (method)
40 uses
math/big (current package)
int.go#L255: for i.Cmp(&K) < 0 {
int.go#L371: func (x *Int) Cmp(y *Int) (r int) {
int.go#L911: if d.Cmp(intOne) != 0 {
int.go#L954: if b.Cmp(intOne) == 0 {
int.go#L1057: for t.Cmp(intOne) != 0 {
int.go#L1088: if x.neg || x.Cmp(p) >= 0 { // ensure 0 <= x < p
rat.go#L443: if f := NewInt(0).lehmerGCD(nil, nil, &z.a, &z.b); f.Cmp(intOne) != 0 {
rat.go#L486: return a.Cmp(&b)
crypto/dsa
dsa.go#L147: if g.Cmp(one) == 0 {
dsa.go#L173: if x.Sign() != 0 && x.Cmp(priv.Q) < 0 {
dsa.go#L231: if k.Sign() > 0 && k.Cmp(priv.Q) < 0 {
dsa.go#L280: if r.Sign() < 1 || r.Cmp(pub.Q) >= 0 {
dsa.go#L283: if s.Sign() < 1 || s.Cmp(pub.Q) >= 0 {
dsa.go#L308: return v.Cmp(r) == 0
crypto/ecdsa
ecdsa_legacy.go#L145: if r.Cmp(N) >= 0 || s.Cmp(N) >= 0 {
ecdsa_legacy.go#L166: return x.Cmp(r) == 0
ecdsa_legacy.go#L187: if k.Sign() != 0 && k.Cmp(N) < 0 {
crypto/elliptic
elliptic.go#L94: if new(big.Int).SetBytes(priv).Cmp(N) >= 0 {
elliptic.go#L168: if x.Cmp(p) >= 0 || y.Cmp(p) >= 0 {
elliptic.go#L194: if x.Cmp(p) >= 0 {
nistec_p256.go#L19: if k.Cmp(c.params.N) >= 0 {
params.go#L63: if x.Sign() < 0 || x.Cmp(curve.P) >= 0 ||
params.go#L64: y.Sign() < 0 || y.Cmp(curve.P) >= 0 {
params.go#L72: return curve.polynomial(x).Cmp(y2) == 0
crypto/rand
util.go#L95: if n.Cmp(max) < 0 {
crypto/rsa
rsa.go#L242: if prime.Cmp(bigOne) <= 0 {
rsa.go#L247: if modulus.Cmp(priv.N) != 0 {
rsa.go#L262: if congruence.Cmp(bigOne) != 0 {
rsa.go#L405: if prime.Cmp(primes[j]) == 0 {
crypto/tls
tls.go#L326: if pub.N.Cmp(priv.N) != 0 {
tls.go#L334: if pub.X.Cmp(priv.X) != 0 || pub.Y.Cmp(priv.Y) != 0 {
crypto/x509
oid.go#L93: if n.Cmp(big.NewInt(0)) == 0 {
oid.go#L100: if n.Cmp(big.NewInt(0)) == 0 {
oid.go#L160: if first.Cmp(big.NewInt(2)) > 0 || (first.Cmp(big.NewInt(2)) < 0 && second.Cmp(big.NewInt(40)) >= 0) {
sec1.go#L111: if k.Cmp(curveOrder) >= 0 {
![]() |
The pages are generated with Golds v0.7.6. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |