SHA256 Optimization
Principles
Crypto instructions are added to the Armv8 instruction set, including hardware acceleration instructions related to the AES encryption/decryption algorithms, SHA1, and SHA256. This greatly improves the computing performance. Instructions for SHA256 optimization lists the instructions used for SHA256 optimization.
Instruction |
Function |
Example |
|---|---|---|
SHA256H |
SHA256 hash update (part 1) |
SHA256H q0, q1, v2.4s |
SHA256H2 |
SHA256 hash update (part 2) |
SHA256H2 q0, q1, v2.4s |
SHA256SU0 |
SHA256 schedule update 0 |
SHA256SU0 v0.4s, v1.4s |
SHA256SU1 |
SHA256 schedule update 1 |
SHA256SU1 v0.4s, v1.4s, v2.4s |
Parent topic: Optimization of Hot Functions