tree: 483997d185bb479c0b740ec54159abe545c432cf [path history] [tgz]
  1. crypto_provider/
  2. crypto_provider_boringssl/
  3. crypto_provider_default/
  4. crypto_provider_rustcrypto/
  5. crypto_provider_stubs/
  6. crypto_provider_test/
  7. README.md
nearby/crypto/README.md

What is this?

A crypto provider that abstracts over different crypto implementations, mainly the Rust implementations by RustCrypto and BoringSSL.

Project structure

crypto_provider

Our own abstraction on top of crypto implementations, including functionalities like AES, SHA2, X25519 and P256 ECDH, HKDF, HMAC, etc.

Two implementations are currently provided, crypto_provider_rustcrypto and crypto_provider_boringssl.

crypto_provider::aes

Abstraction on top plain AES, including AES-CTR and AES-CBC.

Since we know we‘ll have multiple AES implementations in practice (an embedded device might want to use mbed, but a phone or server might use BoringSSL, etc), it’s nice to define our own minimal AES interface that exposes only what we need and is easy to use from FFI (when we get to that point).

crypto_provider_rustcrypto

Implementations of crypto_provider types using the convenient pure-Rust primitives from Rust Crypto.

crypto_provider_boringssl

Implementations of crypto_provider types using the bssl-crypto, which is a Rust binding layer for BoringSSL.

Setup

See nearby/presence/README.md for machine setup instructions.