aboutsummaryrefslogtreecommitdiff
path: root/crypto/ecdsa/ecdsa.go
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ecdsa/ecdsa.go')
-rw-r--r--crypto/ecdsa/ecdsa.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/ecdsa/ecdsa.go b/crypto/ecdsa/ecdsa.go
new file mode 100644
index 0000000..3793663
--- /dev/null
+++ b/crypto/ecdsa/ecdsa.go
@@ -0,0 +1,11 @@
1package ecdsa
2
3import (
4 "crypto/ecdsa"
5 "crypto/elliptic"
6 "crypto/rand"
7)
8
9func GenerateECPrivateKey() (*ecdsa.PrivateKey, error) {
10 return ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
11}