mirror of
https://github.com/golang/go
synced 2024-11-23 17:30:02 -07:00
crypto/tls: disable AES-GCM prioritization on arm64 for now
This commit is contained in:
parent
bf8cbdf9a1
commit
a611e3ecb1
@ -921,7 +921,14 @@ func initDefaultCipherSuites() {
|
|||||||
// Check the cpu flags for each platform that has optimized GCM implementations.
|
// Check the cpu flags for each platform that has optimized GCM implementations.
|
||||||
// Worst case, these variables will just all be false
|
// Worst case, these variables will just all be false
|
||||||
hasGCMAsmAMD64 := cpu.X86.HasAES && cpu.X86.HasPCLMULQDQ
|
hasGCMAsmAMD64 := cpu.X86.HasAES && cpu.X86.HasPCLMULQDQ
|
||||||
hasGCMAsmARM64 := cpu.ARM64.HasAES && cpu.ARM64.HasPMULL
|
|
||||||
|
// TODO: enable the arm64 HasAES && HasPMULL feature check after the
|
||||||
|
// optimized AES-GCM implementation for arm64 is merged (CL 107298).
|
||||||
|
// This is explicitly set to false for now to prevent misprioritization
|
||||||
|
// of AES-GCM based cipher suites, which will be slower than chacha20-poly1305
|
||||||
|
hasGCMAsmARM64 := false
|
||||||
|
// hasGCMAsmARM64 := cpu.ARM64.HasAES && cpu.ARM64.HasPMULL
|
||||||
|
|
||||||
hasGCMAsmS390X := cpu.S390X.HasKM && (cpu.S390X.HasKMA || (cpu.S390X.HasKMCTR && cpu.S390X.HasKIMD))
|
hasGCMAsmS390X := cpu.S390X.HasKM && (cpu.S390X.HasKMA || (cpu.S390X.HasKMCTR && cpu.S390X.HasKIMD))
|
||||||
|
|
||||||
hasGCMAsm := hasGCMAsmAMD64 || hasGCMAsmARM64 || hasGCMAsmS390X
|
hasGCMAsm := hasGCMAsmAMD64 || hasGCMAsmARM64 || hasGCMAsmS390X
|
||||||
|
Loading…
Reference in New Issue
Block a user