Home | History | Annotate | Download | only in x509

Lines Matching full:privatekey

26 	PrivateKey    []byte
32 func ParseECPrivateKey(der []byte) (*ecdsa.PrivateKey, error) {
37 func MarshalECPrivateKey(key *ecdsa.PrivateKey) ([]byte, error) {
48 func marshalECPrivateKeyWithOID(key *ecdsa.PrivateKey, oid asn1.ObjectIdentifier) ([]byte, error) {
55 PrivateKey: paddedPrivateKey,
65 func parseECPrivateKey(namedCurveOID *asn1.ObjectIdentifier, der []byte) (key *ecdsa.PrivateKey, err error) {
84 k := new(big.Int).SetBytes(privKey.PrivateKey)
89 priv := new(ecdsa.PrivateKey)
93 privateKey := make([]byte, (curveOrder.BitLen()+7)/8)
97 for len(privKey.PrivateKey) > len(privateKey) {
98 if privKey.PrivateKey[0] != 0 {
101 privKey.PrivateKey = privKey.PrivateKey[1:]
107 copy(privateKey[len(privateKey)-len(privKey.PrivateKey):], privKey.PrivateKey)
108 priv.X, priv.Y = curve.ScalarBaseMult(privateKey)