rust-embedded-community / embedded-storage

An Embedded Storage Abstraction Layer
Apache License 2.0
68 stars 23 forks source link

Secure storage #28

Open olanod opened 2 years ago

olanod commented 2 years ago

Would a "secure storage" abstraction fit in this repo? My initial use case is something rather high level to store and retrieve secrets by a generic key but happy to hear more ideas of what this kind of API should look like.

MathiasKoch commented 2 years ago

I think some more context on your usecase would be needed in order to answer this? What is it about "secure" storage that cannot be solved using the current set of traits? I for one am storing secrets just fine using a simple abstraction on top of the current traits?

olanod commented 2 years ago

My use case is that, storing/retrieving some secrets by a key(AsRef<[u8]>). I get you can probably implement anything with the current traits but not only a key/value store abstraction wouldn't hurt since it's a common pattern but also making sure the store is secure/encrypted would be event better. It could simply be a marker trait similar to how rand_core::CryptoRng doesn't do anything other than signaling that a given generator is cryptographically secure.