| Crates.io | bls-sig-cli |
| lib.rs | bls-sig-cli |
| version | 0.1.5 |
| created_at | 2025-07-05 18:44:35.110527+00 |
| updated_at | 2025-07-05 18:56:03.059804+00 |
| description | A command-line tool for BLS signature operations (keygen, pubkey, sign, verify). |
| homepage | https://github.com/sidx04/BLS-Signatures |
| repository | https://github.com/sidx04/BLS-Signatures |
| max_upload_size | |
| id | 1739379 |
| size | 51,507 |
bls-sig-cli)A proof-of-concept, command-line tool for BLS signature operations, providing functionalities for key generation, public key derivation, message signing, and signature verification.
bls-sig-cli is a versatile command-line interface designed to facilitate various operations related to BLS (Boneh-Lynn-Shacham) signatures. It leverages robust cryptographic libraries to provide a secure and easy-to-use tool for generating keys, signing messages, and verifying signatures.
To install bls-sig-cli directly from Crates.io, ensure you have Rust and Cargo installed, then run:
cargo install bls-sig-cli
If you prefer to build from source, follow these steps:
git clone https://github.com/sidx04/bls-sig-cli.git
cd bls-sig-cli
cargo build --release
The executable will be located at target/release/bls-sig-cli. You can then move it to a directory in your PATH:
cp target/release/bls-sig-cli ~/.local/bin/ # or any other specified directory
The bls-sig-cli CLI provides several subcommands, each corresponding to a specific BLS signature operation.
BLS Signatures CLI
Usage: bls-sig-cli <COMMAND>
keygenGenerate a new BLS secret key.
Usage: bls-sig-cli keygen [OPTIONS]
Options:
-i, --ikm <IKM>: Optional. Input Key Material used to derive the BLS private key.-o, --out <OUT>: Optional. Path to store the generated secret key.-h, --help: Print help.pubkeyDerive and print the public key from a secret key file.
Usage: bls-sig-cli pubkey [OPTIONS]
Options:
-p, --path <PATH>: Optional. Path to the secret key file.-h, --help: Print help.signSign a message using a BLS secret key. A message can be any file or any arbitrary string of characters.
Usage: bls-sig-cli sign [OPTIONS] --msg <MSG>
Options:
-p, --path <PATH>: Optional. Path to the secret key file.-m, --msg <MSG>: Mandatory. Message to be signed.-h, --help: Print help.verifyVerify a BLS signature.
Usage: bls-sig-cli verify --pk <PK> --msg <MSG> --sig <SIG>
Options:
-p, --pk <PK>: Mandatory. Public key (hex).-m, --msg <MSG>: Mandatory. Message used during signing.-s, --sig <SIG>: Mandatory. Signature (hex).-h, --help: Print help.Generate a random secret key and save to a file:
bls-sig-cli keygen --out my_secret.key
Generate a secret key from IKM:
bls-sig-cli keygen --ikm "MY_SUPER_SECRET_STRING"
Derive a public key:
bls-sig-cli pubkey --path my_secret.key
Sign a message:
bls-sig-cli sign --path my_secret.key --msg "Hello, world!"
Verify a signature:
bls-sig-cli verify --pk PK_HEX --msg "MSG_STRING" --sig SIG_HEX
Replace
PK_HEX,MSG_STRING, andSIG_HEXwith actual values.
Contributions are welcome! Feel free to open an issue or submit a pull request on the GitHub repository.
This project is licensed under: