#pe-file #certificate #authenticode

cross-authenticode

Cross-platform implementation of Authenticode signature verification

4 releases (1 stable)

Uses new Rust 2024

new 1.0.0 Apr 4, 2025
0.2.0 Apr 3, 2025
0.1.1 Mar 1, 2025
0.1.0 Feb 28, 2025

#4 in #authenticode

Download history 77/week @ 2025-02-22 220/week @ 2025-03-01 8/week @ 2025-03-08 54/week @ 2025-03-29

65 downloads per month

MIT/Apache

1MB
644 lines

Contains (DOS exe, 1.5MB) test-pe/test-signed-64.bin, (DOS exe, 680KB) test-pe/test-signed-32.bin, (DOS exe, 180KB) test-pe/test-unsigned-64.bin, (DOS exe, 61KB) test-pe/test-unsigned-32.bin

cross-authenticode

Cross platform library to check authenticode signatures and certificate hashes of PE files. It's focus is on a seamless cross platform experience, so that you can use the same code on Windows, Linux and macOS.

Features

  • Extract all certificates from a PE file
  • Compute the SHA-1 and SHA-256 (or other) hash (thumbprint/fingerprint) of a certificate
  • Verify the signature of a PE file by computing the hash of the file and comparing it to the hash in the signature

Documentation

The documentation can be found docs.rs/cross-authenticode

There are a few other projects on crates.io that deal with authenticode signatures. Here is a list of them and why I decided to write my own:

Dependencies

~3–4MB
~85K SLoC