• Vlad Krasnov's avatar
    crypto/aes: make the GHASH part of AES-GCM faster · b2174a16
    Vlad Krasnov authored
    By processing 8 blocks in parallel GHASH achieves higher throughput on amd64
    
    Results on Skylake i7:
    
    benchmark                   old ns/op     new ns/op     delta
    BenchmarkAESGCMSeal1K-8     316           314           -0.63%
    BenchmarkAESGCMOpen1K-8     282           281           -0.35%
    BenchmarkAESGCMSign8K-8     5611          1099          -80.41%
    BenchmarkAESGCMSeal8K-8     1869          1922          +2.84%
    BenchmarkAESGCMOpen8K-8     1718          1724          +0.35%
    
    benchmark                   old MB/s     new MB/s     speedup
    BenchmarkAESGCMSeal1K-8     3237.10      3260.94      1.01x
    BenchmarkAESGCMOpen1K-8     3629.74      3638.10      1.00x
    BenchmarkAESGCMSign8K-8     1459.82      7452.99      5.11x
    BenchmarkAESGCMSeal8K-8     4382.45      4260.93      0.97x
    BenchmarkAESGCMOpen8K-8     4766.41      4750.54      1.00x
    
    Change-Id: I479f2a791a968caa1c516115b0b6b96a791a20d2
    Reviewed-on: https://go-review.googlesource.com/57150Reviewed-by: 's avatarAdam Langley <agl@golang.org>
    b2174a16
Name
Last commit
Last update
..
aes_gcm.go Loading commit data...
aes_test.go Loading commit data...
asm_amd64.s Loading commit data...
asm_ppc64le.s Loading commit data...
asm_s390x.s Loading commit data...
block.go Loading commit data...
cbc_s390x.go Loading commit data...
cipher.go Loading commit data...
cipher_amd64.go Loading commit data...
cipher_generic.go Loading commit data...
cipher_ppc64le.go Loading commit data...
cipher_s390x.go Loading commit data...
const.go Loading commit data...
ctr_s390x.go Loading commit data...
gcm_amd64.s Loading commit data...
gcm_s390x.go Loading commit data...
modes.go Loading commit data...
modes_test.go Loading commit data...