ciranda 0.1.2

A deterministic password generator
Documentation

Ciranda

crates.io docs.rs CI Apache2.0/MIT

A deterministic password generator written in Rust: given the same inputs, it always produces the same password. Memorize one master seed and derive unique passwords per context.

Ciranda cover

A ciranda acabou de começar, e ela é!

E é praieira! Segura bem forte a mão

E é praieira! Vou lembrando a revolução

— Chico Science

Usage

cargo install ciranda
ciranda

The user will be prompted for:

  • seed — a master secret, entered hidden and confirmed
  • context — identifier for the password (e.g. github)
  • length — desired password length in characters (between 4 and 128)
  • character sets — uppercase, lowercase, digits, and/or special characters
  • Argon2 profile — derivation cost preset (Development, Standard, or Hardened)

seed is the secret input and context separates derived passwords for different services or accounts. Therefore, the same seed can produce different passwords for different contexts, for example, such as github and email.

At least one character set must be selected. Unselected sets are excluded from the generated password entirely. Use Space to toggle character sets and Enter to confirm the selection.

How it works

  1. The context (e.g. a site name) is hashed with BLAKE3 to produce a salt sized for Argon2id.
  2. Argon2id enhances the seed (master secret) using that salt, producing a 64-byte key. The selected Argon2 profile controls the computational cost.
  3. The key is expanded into deterministic streams and used to shuffle character buckets and pick password characters (every selected set contributes at least one character).
  4. The result is copied to the clipboard.

Argon2 profiles

  • Development8 KiB, t=1, p=1; intended only for tests and fast local iteration
  • Standard64 MiB, t=3, p=4; the default interactive profile based on RFC 9106's lower-memory recommended Argon2id settings
  • Hardened2 GiB, t=1, p=4; a stronger high-memory profile based on RFC 9106's first recommended Argon2id settings

For library usage, password construction is configured with PasswordSettings, which contains the desired length and selected CharacterSets. Profiles resolve to Argon2Settings, which contain only the m_cost, t_cost, and p_cost values Ciranda actually honors. The derived-key output length stays fixed internally.

Changing the Argon2 profile changes the derived password, but it is not the recommended rotation mechanism. For rotation:

  • Change the seed for global rotation
  • Change or version the context for service-specific rotation

Documentation

Dependencies

  • arboard — cross-platform clipboard access
  • argon2 — Argon2id key derivation
  • blake3 — BLAKE3 hashing and deterministic byte streams
  • dialoguer — interactive terminal prompts

Disclaimer

This is a project developed with the assistance of AI agents. I am not an expert and I am using it to learn about Rust and cryptography. Use it carefully.

The illustration was first generated using OpenAI’s GPT-5.3 multimodal model via prompt-based image synthesis, with iterative refinements to reinterpret Matisse’s Dance in a Manguebeat context, then it was used as input to Google's Gemini 3 Flash Image (Nano Banana 2) to generate an image better emulating Fauvist painting techniques.

License

The crate is 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.