ecdsa p256 ecies
CreateECDSA() (*ecdsa.PrivateKey, error)
LoadHexPrivateKey(h string) (*ecdsa.PrivateKey, error)
LoadHexPublicKey(h string) (*ecdsa.PublicKey, []byte, error)
LoadBase64PublicKey(h string) (*ecdsa.PublicKey, []byte, error)
GenSharedKey(ownerPrk *ecdsa.PrivateKey, otherPub *ecdsa.PublicKey) ([]byte, error)
Encrypt(publicTo, message []byte) ([]byte, error)
Decrypt(privateKey *ecdsa.PrivateKey, msg []byte) ([]byte, error)
Sign(prk *ecdsa.PrivateKey, msg []byte) ([]byte, error)
Verify(pub *ecdsa.PublicKey, msg, sign []byte) bool
// CreateECDSA
goos: windows
goarch: amd64
pkg: github.com/godaddy-x/eccrypto
cpu: 12th Gen Intel(R) Core(TM) i5-12400F
BenchmarkECDSACreate
BenchmarkECDSACreate-12 94461 12089 ns/op
// GenSharedKey
goos: windows
goarch: amd64
pkg: github.com/godaddy-x/eccrypto
cpu: 12th Gen Intel(R) Core(TM) i5-12400F
BenchmarkECCSharedKey
BenchmarkECCSharedKey-12 26563 44460 ns/op
// Encrypt
goos: windows
goarch: amd64
pkg: github.com/godaddy-x/eccrypto
cpu: 12th Gen Intel(R) Core(TM) i5-12400F
BenchmarkECDSAEncrypt
BenchmarkECDSAEncrypt-12 19818 60096 ns/op
// Decrypt
goos: windows
goarch: amd64
pkg: github.com/godaddy-x/eccrypto
cpu: 12th Gen Intel(R) Core(TM) i5-12400F
BenchmarkECCDecrypt
BenchmarkECCDecrypt-12 24715 48010 ns/op
// Sign
goos: windows
goarch: amd64
pkg: github.com/godaddy-x/eccrypto
cpu: 12th Gen Intel(R) Core(TM) i5-12400F
BenchmarkECCSign
BenchmarkECCSign-12 57798 20354 ns/op
// Verify
goos: windows
goarch: amd64
pkg: github.com/godaddy-x/eccrypto
cpu: 12th Gen Intel(R) Core(TM) i5-12400F
BenchmarkECCVerify
BenchmarkECCVerify-12 19876 60247 ns/op