Skip to content
This repository was archived by the owner on Apr 29, 2026. It is now read-only.

Commit f6414cb

Browse files
committed
perf: generate ecdsa key instead of rsa
1 parent 7e8a7dc commit f6414cb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

internal/cert/cert.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
package cert
1818

1919
import (
20+
"crypto/ecdsa"
21+
"crypto/elliptic"
2022
"crypto/rand"
21-
"crypto/rsa"
2223
"crypto/x509"
2324
"crypto/x509/pkix"
2425
"encoding/pem"
@@ -47,7 +48,7 @@ func GetCA() ([]byte, []byte, error) {
4748

4849
// files do not exist, make new ones instead
4950
// source: https://golang.org/src/crypto/tls/generate_cert.go
50-
priv, err := rsa.GenerateKey(rand.Reader, 2048)
51+
priv, err := ecdsa.GenerateKey(elliptic.P224(), rand.Reader)
5152
panicOnErr(err)
5253
serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128)
5354
serialNumber, err := rand.Int(rand.Reader, serialNumberLimit)

0 commit comments

Comments
 (0)