Documentation ¶
Index ¶
- func AEStoEncryptedPEM(raw []byte, pwd []byte) ([]byte, error)
- func AEStoPEM(raw []byte) []byte
- func DERToPrivateKey(der []byte) (key interface{}, err error)
- func DERToPublicKey(raw []byte) (pub interface{}, err error)
- func GetCurveHalfOrdersAt(c elliptic.Curve) *big.Int
- func IsLowS(k *ecdsa.PublicKey, s *big.Int) (bool, error)
- func MarshalECDSASignature(r, s *big.Int) ([]byte, error)
- func PEMtoAES(raw []byte, pwd []byte) ([]byte, error)
- func PEMtoPrivateKey(raw []byte, pwd []byte) (interface{}, error)
- func PEMtoPublicKey(raw []byte, pwd []byte) (interface{}, error)
- func PrivateKeyToDER(privateKey *ecdsa.PrivateKey) ([]byte, error)
- func PrivateKeyToEncryptedPEM(privateKey interface{}, pwd []byte) ([]byte, error)
- func PrivateKeyToPEM(privateKey interface{}, pwd []byte) ([]byte, error)
- func PublicKeyToDER(publicKey interface{}) ([]byte, error)
- func PublicKeyToEncryptedPEM(publicKey interface{}, pwd []byte) ([]byte, error)
- func PublicKeyToPEM(publicKey interface{}, pwd []byte) ([]byte, error)
- func SignatureToLowS(k *ecdsa.PublicKey, signature []byte) ([]byte, error)
- func ToLowS(k *ecdsa.PublicKey, s *big.Int) (*big.Int, error)
- func UnmarshalECDSASignature(raw []byte) (*big.Int, *big.Int, error)
- type ECDSASignature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AEStoEncryptedPEM ¶
AEStoEncryptedPEM encapsulates an AES key in the encrypted PEM format
func DERToPrivateKey ¶
DERToPrivateKey unmarshals a der to private key
func DERToPublicKey ¶
DERToPublicKey unmarshals a der to public key
func MarshalECDSASignature ¶ added in v1.1.0
func PEMtoPrivateKey ¶
PEMtoPrivateKey unmarshals a pem to private key
func PEMtoPublicKey ¶
PEMtoPublicKey unmarshals a pem to public key
func PrivateKeyToDER ¶
func PrivateKeyToDER(privateKey *ecdsa.PrivateKey) ([]byte, error)
PrivateKeyToDER marshals a private key to der
func PrivateKeyToEncryptedPEM ¶
PrivateKeyToEncryptedPEM converts a private key to an encrypted PEM
func PrivateKeyToPEM ¶
PrivateKeyToPEM converts the private key to PEM format. EC private keys are converted to PKCS#8 format.
func PublicKeyToDER ¶
PublicKeyToDER marshals a public key to the der format
func PublicKeyToEncryptedPEM ¶
PublicKeyToEncryptedPEM converts a public key to encrypted pem
func PublicKeyToPEM ¶
PublicKeyToPEM marshals a public key to the pem format
func SignatureToLowS ¶ added in v1.1.0
Types ¶
type ECDSASignature ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.