#crypto #cryptography #no-std #psa

no-std psa-crypto

Wrapper around the PSA Cryptography API

15 releases (8 breaking)

0.9.2 Sep 2, 2022
0.9.1 Nov 30, 2021
0.9.0 Aug 2, 2021
0.8.0 Mar 17, 2021
0.3.0 Jul 14, 2020

#112 in Cryptography

Download history 170/week @ 2022-06-08 127/week @ 2022-06-15 159/week @ 2022-06-22 211/week @ 2022-06-29 145/week @ 2022-07-06 168/week @ 2022-07-13 217/week @ 2022-07-20 321/week @ 2022-07-27 360/week @ 2022-08-03 147/week @ 2022-08-10 140/week @ 2022-08-17 140/week @ 2022-08-24 572/week @ 2022-08-31 178/week @ 2022-09-07 166/week @ 2022-09-14 101/week @ 2022-09-21

1,035 downloads per month
Used in 5 crates (3 directly)

Apache-2.0

6.5MB
131K SLoC

C 99K SLoC // 0.1% comments Shell 12K SLoC // 0.1% comments Visual Studio Project 9K SLoC Python 4.5K SLoC // 0.4% comments Rust 4K SLoC // 0.0% comments Perl 1.5K SLoC // 0.3% comments Visual Studio Solution 703 SLoC C++ 72 SLoC // 0.2% comments Batch 24 SLoC GDB Script 21 SLoC // 0.7% comments TCL 3 SLoC

PSA Cryptography API Rust Wrapper

This is the higher-level, more Rust-friendly interface.

Crates.io Code documentation CI tests

Mbed Crypto backing

The features of this crate can modify what is compiled in from the PSA Crypto specification:

  • operations: everything is included. The psa-crypto-sys crate statically links by default Mbed Crypto. See the documentation of that crate to see how to modify the linking options. This feature is activated by default.
  • interface: only the abstraction over the PSA Crypto interface (types, helper methods) are included. The MBEDTLS_INCLUDE_DIR environment variable is needed to produce Rust shims around PSA Crypto macros.
  • without any of the above: only the specification-defined parts are included.

Dependencies