• Adam Langley's avatar
    math/big: add 4-bit, fixed window exponentiation. · 73f11171
    Adam Langley authored
    A 4-bit window is convenient because 4 divides both 32 and 64,
    therefore we never have a window spanning words of the exponent.
    Additionaly, the benefit of a 5-bit window is only 2.6% at 1024-bits
    and 3.3% at 2048-bits.
    
    This code is still not constant time, however.
    
    benchmark                        old ns/op    new ns/op    delta
    BenchmarkRSA2048Decrypt           17108590     11180370  -34.65%
    Benchmark3PrimeRSA2048Decrypt     13003720      7680390  -40.94%
    
    R=gri
    CC=golang-dev
    https://golang.org/cl/6716048
    73f11171
Name
Last commit
Last update
..
arith.go Loading commit data...
arith_386.s Loading commit data...
arith_amd64.s Loading commit data...
arith_arm.s Loading commit data...
arith_decl.go Loading commit data...
arith_test.go Loading commit data...
calibrate_test.go Loading commit data...
example_test.go Loading commit data...
gcd_test.go Loading commit data...
hilbert_test.go Loading commit data...
int.go Loading commit data...
int_test.go Loading commit data...
nat.go Loading commit data...
nat_test.go Loading commit data...
rat.go Loading commit data...
rat_test.go Loading commit data...