Module rubble::ecdh[][src]

Expand description

Elliptic Curve Diffie-Hellman (ECDH) on P-256.

BLE uses ECDH on P-256 for pairing. This module provides an interface for plugging in different implementations of the P-256 operations. The main consumer of this module is the security module; refer to that for more info about pairing and encryption in BLE.

The primary trait in this module is EcdhProvider. Rubble comes with 2 built-in implementations of that trait:

  • P256Provider and P256SecretKey: These use the pure-Rust p256 crate and are always available.
  • RingProvider and RingSecretKey (behind the ring Cargo feature): These use the ring library to provide the operations. Note that ring does not support #![no_std] operation, so this is mostly useful for tests and other non-embedded usage.

Structs

Error returned by SecretKey::agree when the public key of the other party is invalid.

An ECDH provider using the pure-Rust p256 crate.

A secret key generated by a P256Provider.

A P-256 public key (point on the curve) in uncompressed format.

A shared secret resulting from an ECDH key agreement.

Traits

Trait for ECDH providers.

Secret key operations required by Rubble.

Functions

Runs Rubble’s P-256 provider testsuite against provider.