iq-bech32 0.1.0

Hardened Bech32 (BIP-173) implementation: a human-friendly base-32 encoding format with checksums to prevent transcription errors. This implementation is hardened for handling Bech32-encoded secret keys by automatically clearing memory containing sensitive data. Coming soon: constant-time encoding/decoding support.
Documentation

iq-bech32

Crate Docs Build Status Apache 2.0 Licensed

Rust crate for encoding/decoding Bech32 (BIP-173): a human-friendly base32 encoding for binary data intended for use with cryptographic keys.

[Documentation][https://docs.rs/iq-bech32/]

What is Bech32?

Bech32 is a human-friendly format for representing binary data, namely cryptographic keys (public and private).

The format was designed to use a minimal set of alphanumeric characters which have been selected to avoid accidental confusion, and also adds a checksum across the encoded message, ensuring transcription errors are detected.

What is iq-bech32?

iq-bech32 has been designed to meet the rigorous challenges of handling secret key material, minimizing intermediate buffers and ensuring any memory containing potential key material is zeroed out on drop.

Status

This crate is in a beta-quality state and is ready for experimental usage. Our roadmap is as follows:

  • Zero out (using clear_on_drop) all intermediate buffers and state
  • Support for Bech32 separator characters other than 1
  • TODO: Constant-time encoding/decoding to prevent side-channel leakage

License

The iq-bech32 crate is distributed under the terms of the Apache License (Version 2.0).

See LICENSE file in the iqlusioninc/crates toplevel directory for more information.