trussed-dev / trussed

Modern Cryptographic Firmware
https://trussed.dev
Apache License 2.0
405 stars 26 forks source link

Implement standard Rust crypto traits #126

Open macpijan opened 1 year ago

macpijan commented 1 year ago

Currently, Trussed doesn't implement any of the traits which have become standard in Rust ecosystem, such as rand_core::Rng, digest::Digest to name a few. If these were implemented, it would be easier to use the known APIs, and allow for greater portability, as Trussed could be used as one of the possible crypto backends for certain application.

This has also be discussed here.

Note that our knowledge of the current state of Trussed could be a bit of out of date, so please feel free to correct us if we are wrong.

sosthene-nitrokey commented 1 year ago

A could see a benefit to implementing rand_core::Rng, but I don't think that digest::Digest would make much sense since Trussed supports multiple digest algorithms (SHA-1, SHA-256, SHA-512 and Blake2s)