mirror of
https://github.com/golang/go
synced 2024-11-12 09:50:21 -07:00
crypto/rsa: fix decryption benchmark.
I was an idiot and was thinking that a small base didn't matter because the exponentiation would quickly make the number the same size as the modulus. But, of course, the small base continues to make multiplications unrealistically cheap throughout the computation. R=golang-dev, r CC=golang-dev https://golang.org/cl/6649048
This commit is contained in:
parent
a14f87ca81
commit
3acce59b93
@ -116,7 +116,7 @@ func BenchmarkRSA2048Decrypt(b *testing.B) {
|
||||
}
|
||||
priv.Precompute()
|
||||
|
||||
c := fromBase10("1000")
|
||||
c := fromBase10("8472002792838218989464636159316973636630013835787202418124758118372358261975764365740026024610403138425986214991379012696600761514742817632790916315594342398720903716529235119816755589383377471752116975374952783629225022962092351886861518911824745188989071172097120352727368980275252089141512321893536744324822590480751098257559766328893767334861211872318961900897793874075248286439689249972315699410830094164386544311554704755110361048571142336148077772023880664786019636334369759624917224888206329520528064315309519262325023881707530002540634660750469137117568199824615333883758410040459705787022909848740188613313")
|
||||
|
||||
b.StartTimer()
|
||||
|
||||
@ -141,7 +141,7 @@ func Benchmark3PrimeRSA2048Decrypt(b *testing.B) {
|
||||
}
|
||||
priv.Precompute()
|
||||
|
||||
c := fromBase10("1000")
|
||||
c := fromBase10("8472002792838218989464636159316973636630013835787202418124758118372358261975764365740026024610403138425986214991379012696600761514742817632790916315594342398720903716529235119816755589383377471752116975374952783629225022962092351886861518911824745188989071172097120352727368980275252089141512321893536744324822590480751098257559766328893767334861211872318961900897793874075248286439689249972315699410830094164386544311554704755110361048571142336148077772023880664786019636334369759624917224888206329520528064315309519262325023881707530002540634660750469137117568199824615333883758410040459705787022909848740188613313")
|
||||
|
||||
b.StartTimer()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user