rind

Run dimpl on rind

This page describes rind-dimpl as main has it, ahead of rind-dimpl 0.9.3 on crates.io. Until its next release, take it from git at the commit this page describes. Beside the lines below, add this line under the [patch.crates-io] table of your workspace's root Cargo.toml (add the table if it has none), then run cargo update -p rind-dimpl:

rind-dimpl = { git = "https://github.com/kixel-ai/rind", rev = "80fc7ba544b53a6ca9ab21ba9a946c275eb19a06" }

That moves every crate in your tree that depends on rind-dimpl, and cargo tree -i rind-dimpl then shows it from git+https://github.com/kixel-ai/rind.

This crate provides a CryptoProvider for dimpl, backed by rind, a fork of Graviola.

Build dimpl with default-features = false, since its default features compile aws-lc-rs:

[dependencies]
dimpl = { version = "0.9", default-features = false }
rind-dimpl = "0.9"

That also removes dimpl's rcgen feature, which enables aws-lc-rs, and with it dimpl::certificate::generate_self_signed_certificate(): bring your own certificate.

Then hand the provider to each config, where dimpl's crypto::aws_lc_rs::default_provider() went:

let config = dimpl::Config::builder()
    .with_crypto_provider(rind_dimpl::default_provider())
    .build()?;

Or install it for the process with dimpl::crypto::CryptoProvider::install_default.

It negotiates DTLS 1.2 ECDHE-ECDSA and DTLS 1.3 with AES-128-GCM, AES-256-GCM, and ChaCha20-Poly1305, over X25519, P-256, and P-384, and signs with ECDSA P-256 or P-384 keys in PKCS#8 or SEC1, as DER or PEM.

What rind cannot back

Behaves differently

WebAssembly

It builds for wasm32-wasip2 and wasm32-unknown-unknown, the browser, where rind needs its JavaScript random source, getrandom = { version = "0.4", features = ["wasm_js"] }. PLATFORMS.md lists what each adapter's upstream needs there too, and why rind's constant-time checks do not cover wasm.

Switch with an agent

Paste this into your coding agent, in your repository:

Move this repository from ring or aws-lc-rs to rind, following
https://raw.githubusercontent.com/kixel-ai/rind/main/MIGRATE.md

It migrates on a local branch, reports the build time, binary size, benchmarks, and tests before and after, and asks before opening a PR or filing an issue. To migrate by hand, MIGRATING.md maps each ring and aws-lc-rs item to rind's.

Other libraries