rc-crypto 0.1.4

Crypto library for the RC X509 platform
docs.rs failed to build rc-crypto-0.1.4
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: rc-crypto-0.1.3

rc-crypto

This crate provides cryptographic primitives for use by the X509-based platform, backed by FIPS compatible crypto modules.

The purpose of this crate is to encapsulate any interaction with an underlying crypto module, presenting a simple API to consuming crates.

This crate is for wrapping the crypto modules only - not for general code.

Example Usage

use rc_crypto::{Signature, Signer, keys::*};

// The data to sign.
let data = "bananas".as_bytes();

// Generate an ephemeral key:
let key = PrivateKey::new();

// Sign the data:
let sig = key.sign(data);

// And verify:
assert!(key.public_key().verify(&data, &sig).is_ok());

Tests

Tests exclusively using the public API live in tests/. Each component has unit tests alongside the implementation.