[fpc-devel] x86_64 SHA1 implementation (J. Gareth Moreton)

Arnaud Bouchez webcontact01 at synopse.info
Sun Sep 17 08:05:35 CEST 2023


There is a working SHA-1 and SHA-256 implementation using x86_64 asm and 
also SHA-NI in mORMot 2.

Numbers are very high, e.g. 2GB/s on my Core i5 13500.

Since there is no SHA opcode in FPC asm yet (neither in Delphi), I am 
using hardcoded "db" arrays for SHA-NI instructions.

See 
https://github.com/synopse/mORMot2/blob/4c59b3c212c5efd2f440c1d7f61504ca832a5931/src/crypt/mormot.crypt.core.asmx64.inc#L1154 
for the SHA-NI asm.

Arnaud



More information about the fpc-devel mailing list