#base32 #rfc-4648 #lookup-tables #constant-time-cryptography #thereby #upper-case #constant-time-operation #data-dependent #embedded-friendly

no-std base32ct

Pure Rust implementation of Base32 (RFC 4648) which avoids any usages of data-dependent branches/LUTs and thereby provides portable "best effort" constant-time operation and embedded-friendly no_std support

7 unstable releases

Uses new Rust 2024

0.3.1 Feb 26, 2026
0.3.0 Aug 21, 2025
0.2.2 Feb 23, 2025
0.2.1 May 28, 2024
0.0.0 Jan 11, 2022

#2894 in Cryptography

Download history 274/week @ 2025-11-16 281/week @ 2025-11-23 221/week @ 2025-11-30 238/week @ 2025-12-07 186/week @ 2025-12-14 262/week @ 2025-12-21 226/week @ 2025-12-28 283/week @ 2026-01-04 121/week @ 2026-01-11 375/week @ 2026-01-18 312/week @ 2026-01-25 315/week @ 2026-02-01 350/week @ 2026-02-08 620/week @ 2026-02-15 393/week @ 2026-02-22 433/week @ 2026-03-01

1,825 downloads per month
Used in 40 crates (9 directly)

Apache-2.0 OR MIT

23KB
361 lines

RustCrypto: Constant-Time Base32

crate Docs Build Status Apache2/MIT licensed Rust Version Project Chat

Pure Rust implementation of Base32 (RFC 4648).

Implements lower and upper case Base32 variants without data-dependent branches or lookup tables, thereby providing portable "best effort" constant-time operation.

Supports no_std environments and avoids heap allocations in the core API (but also provides optional alloc support for convenience).

Documentation

Minimum Supported Rust Version (MSRV) Policy

MSRV increases are not considered breaking changes and can happen in patch releases.

The crate MSRV accounts for all supported targets and crate feature combinations, excluding explicitly unstable features.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps