-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase rsa key size to 3072 #348
Conversation
Change the default ginkgo.Eventually timeout to 5sec and polling interval to 200ms
I did some additional testing and it seems that generating a import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"testing"
)
func BenchmarkRSA2048(b *testing.B) {
for i := 0; i < b.N; i++ {
_, err := rsa.GenerateKey(rand.Reader, 2048)
if err != nil {
b.Fatalf("error occurred")
}
}
}
func BenchmarkRSA3072(b *testing.B) {
for i := 0; i < b.N; i++ {
_, err := rsa.GenerateKey(rand.Reader, 3072)
if err != nil {
b.Fatalf("error occurred")
}
}
}
func BenchmarkRSA4096(b *testing.B) {
for i := 0; i < b.N; i++ {
_, err := rsa.GenerateKey(rand.Reader, 4096)
if err != nil {
b.Fatalf("error occurred")
}
}
}
func BenchmarkECDSA256(b *testing.B) {
for i := 0; i < b.N; i++ {
_, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
if err != nil {
b.Fatalf("error occurred")
}
}
} go test -bench=. -benchtime=10s
goos: darwin
goarch: arm64
pkg: github.com/test/play
BenchmarkRSA2048-12 134 90775602 ns/op
BenchmarkRSA3072-12 36 374908398 ns/op
BenchmarkRSA4096-12 15 1335982369 ns/op
BenchmarkECDSA256-12 1000000 11136 ns/op
PASS
ok github.com/test/play 72.649s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/cla |
@petersutter I reached out successfully to the cla-assistant to recheck this pull request. |
What this PR does / why we need it:
Gardener uses 4096 bits to generate ssh keys. Let's use the same sizing here as well.See #348 (comment)Similar to gardener/gardener#8635
https://github.com/gardener/gardener/blob/3e9f4819aa8ab5badacf76f8bb7c1dae31192bf3/pkg/operation/botanist/secrets.go#L255
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: