11 releases

Uses new Rust 2024

0.3.0 Jul 9, 2026
0.2.2 Jul 1, 2026
0.1.6 Apr 10, 2026
0.1.5 Feb 25, 2026
0.1.3 Nov 4, 2025

#1628 in Cryptography


Used in 3 crates

MIT/Apache

16KB
299 lines

i0

i0 reference implementation

usage

cargo add i0

use i0::{v3, Timestamp};
use rand::{TryRng, rngs::SysRng};

let mut seed: [u8; 32] = [0u8; 32];
SysRng.try_fill_bytes(&mut seed)?;

let metadata = v3::Metadata {
    designation: "some user-defined string",
    timestamp: &Timestamp::new(),
    seed: &seed,
};

let (short: String, long: String) = v3::generate(&metadata);

features

  • v3 (default) enables i0:3 generation
  • v2 enables i0:2 generation (deprecated)
  • display used for cli tools; provides i0::display module to print canonical representation to stdout
  • dig used for intentional hash collisions (e.g. in i0-dig); provides i0::<ver>::dig

tooling

there are 3 separate crates for different binary tools:

  • i0 (i0-cli) to generate i0-dentifiers
  • i0-dig tries to cause an intentional hash collision for getting vanity i0-dentifiers
  • i0-bench is a small benchmarking tool, because i0 turned out surprisingly useful for comparing raw CPU compute

Dependencies

~1–3MB
~68K SLoC