crypto/rsa.PrivateKey.Primes (field)
48 uses
crypto/rsa (current package)
rsa.go#L103: Primes []*big.Int // prime factors of N, has >= 2 elements.
rsa.go#L125: if len(priv.Primes) != len(xx.Primes) {
rsa.go#L128: for i := range priv.Primes {
rsa.go#L129: if priv.Primes[i].Cmp(xx.Primes[i]) != 0 {
rsa.go#L210: for _, prime := range priv.Primes {
rsa.go#L229: for _, prime := range priv.Primes {
rsa.go#L338: priv.Primes = primes
rsa.go#L463: priv.Precomputed.Dp = new(big.Int).Sub(priv.Primes[0], bigOne)
rsa.go#L466: priv.Precomputed.Dq = new(big.Int).Sub(priv.Primes[1], bigOne)
rsa.go#L469: priv.Precomputed.Qinv = new(big.Int).ModInverse(priv.Primes[1], priv.Primes[0])
rsa.go#L471: r := new(big.Int).Mul(priv.Primes[0], priv.Primes[1])
rsa.go#L472: priv.Precomputed.CRTValues = make([]CRTValue, len(priv.Primes)-2)
rsa.go#L473: for i := 2; i < len(priv.Primes); i++ {
rsa.go#L474: prime := priv.Primes[i]
rsa.go#L535: m = new(big.Int).Exp(c, priv.Precomputed.Dp, priv.Primes[0])
rsa.go#L536: m2 := new(big.Int).Exp(c, priv.Precomputed.Dq, priv.Primes[1])
rsa.go#L539: m.Add(m, priv.Primes[0])
rsa.go#L542: m.Mod(m, priv.Primes[0])
rsa.go#L543: m.Mul(m, priv.Primes[1])
rsa.go#L547: prime := priv.Primes[2+i]
crypto/x509
pkcs1.go#L78: key.Primes = make([]*big.Int, 2+len(priv.AdditionalPrimes))
pkcs1.go#L79: key.Primes[0] = priv.P
pkcs1.go#L80: key.Primes[1] = priv.Q
pkcs1.go#L85: key.Primes[i+2] = a.Prime
pkcs1.go#L108: if len(key.Primes) > 2 {
pkcs1.go#L117: P: key.Primes[0],
pkcs1.go#L118: Q: key.Primes[1],
pkcs1.go#L126: priv.AdditionalPrimes[i].Prime = key.Primes[2+i]
golang.org/x/crypto/openpgp/packet
private_key.go#L216: err = writeBig(w, priv.Primes[1])
private_key.go#L220: err = writeBig(w, priv.Primes[0])
private_key.go#L316: rsaPriv.Primes = make([]*big.Int, 2)
private_key.go#L317: rsaPriv.Primes[0] = new(big.Int).SetBytes(p)
private_key.go#L318: rsaPriv.Primes[1] = new(big.Int).SetBytes(q)
golang.org/x/crypto/ssh
keys.go#L1356: Primes: []*big.Int{key.P, key.Q},
golang.org/x/crypto/ssh/agent
client.go#L534: if len(k.Primes) != 2 {
client.go#L535: return fmt.Errorf("agent: unsupported RSA key with %d primes", len(k.Primes))
client.go#L544: P: k.Primes[0],
client.go#L545: Q: k.Primes[1],
client.go#L668: if len(k.Primes) != 2 {
client.go#L669: return fmt.Errorf("agent: unsupported RSA key with %d primes", len(k.Primes))
client.go#L677: P: k.Primes[0],
client.go#L678: Q: k.Primes[1],
server.go#L254: Primes: []*big.Int{k.P, k.Q},
server.go#L403: Primes: []*big.Int{k.Q, k.P},
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin 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 @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |