Closed Bug 1528113 Opened 4 years ago Closed 3 years ago

Use ARM's crypt extension for SHA256

Categories

(NSS :: Libraries, enhancement, P3)

ARM64
Android
enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: m_kato, Assigned: m_kato)

Details

Attachments

(1 file, 1 obsolete file)

When I implement it as test, it improves a lot of performance for SHA256.

  • ThunderX is 3x faster then C implementation on ARM64
  • Cortex-A53 is 8x faster then C implementation on ARM64

For Android/aarch64 (and Windows), we should use it.

result on a1.xlarge on AWS (Cortex-A72)

      mode          in  opreps  cxreps     context          op   time(sec)     thrgput
  sha256_e         8Gb      5M       0       0.000   10000.000      10.000       842Mb <-- with patch
  sha256_e         1Gb    943T       0       0.000   10000.000      10.000       154Mb <-- without patch
Priority: -- → P3

ARMv8 CPU has accelerated hardware instruction for SHA256 that supports GCC 4.9+. We should use it if available.

AES has landed (again) so this needs rebase.

(btw, tested on A72, works great)

Attachment #9079656 - Attachment is obsolete: true
Attachment #9079647 - Attachment description: Bug 1528113 - Use ARM's crypt extension for SHA256 → Bug 1528113 - Use ARM's crypto extension for SHA256

I will file a new bug for SHA1's implementation.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.54
You need to log in before you can comment on or make changes to this bug.