#openpgp #simd #x86-64 #checksum #cpu #architecture #crc24

crc24-openpgp-fast

CRC24 OpenPGP calculator with speedups for x86-64 CPUs with SIMD

3 releases

0.1.3 Feb 21, 2024
0.1.2 Nov 27, 2022
0.1.1 Nov 27, 2022

#548 in Hardware support

Download history 80/week @ 2024-02-15 161/week @ 2024-02-22 11/week @ 2024-02-29 3/week @ 2024-03-07

251 downloads per month

MIT license

10KB
170 lines

crc24-openpgp-fast

SIMD implementation of the CRC24 checksum as used in OpenPGP, for the x86-64 architecture.

CPU requirements

x86-64 with the following extensions:

  • pclmulqdq
  • sse2 (implied by sse4.1)
  • sse4.1

NOTE: Will fallback to a non-SIMD implementation if CPU features are not present, so don't worry about using this library for code that potentially goes into non-compatible CPUs.

Usage

let res: u32 = crc24_openpgp_fast::hash_raw(&my_binary_slice);

There is no "update"-like functionality yet, since doing this with arbitrarily lengths can be tricky with SIMD and destroy performance.

Dependencies

~4KB