Repository navigation
Description
FEAT_SHA3 provides instructions to accelerate the SHA-3 hash algorithm. This set of instructions is described as
the SHA3 instructions.
The SHA-3 hash algorithm is based on a running digest of 1600 bytes, arranged as a five by five array of 64-bit registers. The Arm acceleration of these instructions is based on mapping the 25 64-bit values into 25 vector registers, with each 64-bit value occupying the same 64-bit element in each vector. A series of transformations is performed on these registers as part of a round of the SHA-3 hash calculation.
The SIMD nature of the vector registers means the acceleration can compute two parallel SHA3 hash calculations,
where one calculation is performed using the zeroth 64-bit element of each vector, and the other calculation is
performed using the first 64-bit element of each vector.
namespace System.Runtime.Intrinsics.Arm;
/// VectorT Summary
public abstract partial class Sha3 : AdvSimd /// Feature: FEAT_SHA3
{
/// T: byte, ushort, uint, ulong, sbyte, short, int, long
public static unsafe Vector128<T> BitwiseClearXor(Vector128<T> xor, Vector128<T> value, Vector128<T> mask); // BCAX
public static unsafe Vector128<ulong> BitwiseRotateLeftBy1AndXor(Vector128<ulong> a, Vector128<ulong> b); // RAX1
/// T: byte, ushort, uint, ulong, sbyte, short, int, long
public static unsafe Vector128<T> Xor(Vector128<T> value1, Vector128<T> value2, Vector128<T> value3); // EOR3
public static unsafe Vector128<ulong> XorRotateRight(Vector128<ulong> left, Vector128<ulong> right, [ConstantExpected] byte count); // XAR
/// total method signatures: 4
}
Activity
a74nh commentedon Feb 20, 2024
a74nh commentedon Feb 20, 2024
This adds the API for
FEAT_SHA3. It complements theFEAT_SVE_SHA3API which is specified in #94425.Note this is a
NEON(AdvSimd) extension. It is not a SVE extension.a74nh commentedon Feb 20, 2024
@tannergooding : As requested, the API for SHA3. SVE versions of
BitwiseRotateLeftBy1AndXorexist inSVE_SHA3and the other ones exist in SVE2bartonjs commentedon Jan 6, 2026
Video
Add SHA3 and SVE SHA3 APIs
Add SHA3 and SVE SHA3 APIs (#126941)
Add SHA3 and SVE SHA3 APIs (#126941)