- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 42 for Curve (0.04 sec)
-
src/crypto/x509/sec1.go
} var curve elliptic.Curve if namedCurveOID != nil { curve = namedCurveFromOID(*namedCurveOID) } else { curve = namedCurveFromOID(privKey.NamedCurveOID) } if curve == nil { return nil, errors.New("x509: unknown elliptic curve") } k := new(big.Int).SetBytes(privKey.PrivateKey) curveOrder := curve.Params().N if k.Cmp(curveOrder) >= 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 4.6K bytes - Viewed (0) -
src/crypto/elliptic/nistec.go
} p2, err := curve.pointFromAffine(x2, y2) if err != nil { panic("crypto/elliptic: Add was called on an invalid point") } return curve.pointToAffine(p1.Add(p1, p2)) } func (curve *nistCurve[Point]) Double(x1, y1 *big.Int) (*big.Int, *big.Int) { p, err := curve.pointFromAffine(x1, y1) if err != nil { panic("crypto/elliptic: Double was called on an invalid point") } return curve.pointToAffine(p.Double(p)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 21 16:19:34 UTC 2022 - 9.6K bytes - Viewed (0) -
src/crypto/ecdh/ecdh.go
// // This check is performed in constant time as long as the key types and their // curve match. func (k *PublicKey) Equal(x crypto.PublicKey) bool { xx, ok := x.(*PublicKey) if !ok { return false } return k.curve == xx.curve && subtle.ConstantTimeCompare(k.publicKey, xx.publicKey) == 1 } func (k *PublicKey) Curve() Curve { return k.curve } // PrivateKey is an ECDH private key, usually kept secret. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 6.4K bytes - Viewed (0) -
src/crypto/elliptic/params.go
// use that instead of the generic one. if specific, ok := matchesSpecificCurve(curve); ok { return specific.Add(x1, y1, x2, y2) } panicIfNotOnCurve(curve, x1, y1) panicIfNotOnCurve(curve, x2, y2) z1 := zForAffine(x1, y1) z2 := zForAffine(x2, y2) return curve.affineFromJacobian(curve.addJacobian(x1, y1, z1, x2, y2, z2)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 16 17:46:09 UTC 2024 - 9.6K bytes - Viewed (0) -
src/crypto/ecdh/x25519.go
} return &PrivateKey{ curve: c, privateKey: append([]byte{}, key...), }, nil } func (c *x25519Curve) privateKeyToPublicKey(key *PrivateKey) *PublicKey { if key.curve != c { panic("crypto/ecdh: internal error: converting the wrong key type") } k := &PublicKey{ curve: key.curve, publicKey: make([]byte, x25519PublicKeySize), }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 3.1K bytes - Viewed (0) -
src/crypto/elliptic/elliptic.go
func Marshal(curve Curve, x, y *big.Int) []byte { panicIfNotOnCurve(curve, x, y) byteLen := (curve.Params().BitSize + 7) / 8 ret := make([]byte, 1+2*byteLen) ret[0] = 4 // uncompressed point x.FillBytes(ret[1 : 1+byteLen]) y.FillBytes(ret[1+byteLen : 1+2*byteLen]) return ret } // MarshalCompressed converts a point on the curve into the compressed form
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 9K bytes - Viewed (0) -
src/crypto/ecdh/nist.go
if err != nil { return nil, err } return newBoringPrivateKey(c, bk, key) } k := &PrivateKey{ curve: c, privateKey: append([]byte{}, key...), } return k, nil } func newBoringPrivateKey(c Curve, bk *boring.PrivateKeyECDH, privateKey []byte) (*PrivateKey, error) { k := &PrivateKey{ curve: c, boring: bk, privateKey: append([]byte(nil), privateKey...), } return k, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 8.1K bytes - Viewed (0) -
src/crypto/internal/boring/ecdh.go
} return bigBytesECDH(curve, big) } func bigBytesECDH(curve string, big *C.GO_BIGNUM) ([]byte, error) { out := make([]byte, curveSize(curve)) if C._goboringcrypto_BN_bn2bin_padded((*C.uint8_t)(&out[0]), C.size_t(len(out)), big) == 0 { return nil, fail("BN_bn2bin_padded") } return out, nil } func curveSize(curve string) int { switch curve { default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 17:51:31 UTC 2023 - 6.2K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa_s390x_test.go
curves := [...]elliptic.Curve{ elliptic.P256(), elliptic.P384(), elliptic.P521(), } for _, curve := range curves { name := curve.Params().Name t.Run(name, func(t *testing.T) { testKeyGeneration(t, curve) }) t.Run(name, func(t *testing.T) { testSignAndVerify(t, curve) }) t.Run(name, func(t *testing.T) { testNonceSafety(t, curve) }) t.Run(name, func(t *testing.T) { testINDCCA(t, curve) })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:29:44 UTC 2024 - 834 bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa_legacy.go
// This file contains a math/big implementation of ECDSA that is only used for // deprecated custom curves. func generateLegacy(c elliptic.Curve, rand io.Reader) (*PrivateKey, error) { k, err := randFieldElement(c, rand) if err != nil { return nil, err } priv := new(PrivateKey) priv.PublicKey.Curve = c priv.D = k priv.PublicKey.X, priv.PublicKey.Y = c.ScalarBaseMult(k.Bytes()) return priv, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 4.8K bytes - Viewed (0)