{"id":37869837,"url":"https://github.com/opendream/vanityssh-rust","last_synced_at":"2026-01-16T16:40:01.409Z","repository":{"id":289330170,"uuid":"970873014","full_name":"opendream/vanityssh-rust","owner":"opendream","description":"VanitySSH-Rust is a Rust-based project designed to generate SSH keys with customizable prefixes or patterns. It emphasizes performance and security, leveraging Rust's strengths for efficient cryptographic operations and minimal resource usage.","archived":false,"fork":false,"pushed_at":"2025-06-16T14:24:34.000Z","size":97,"stargazers_count":1,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-16T14:44:17.652Z","etag":null,"topics":["cryptography","key-generation","rust","ssh","vanity-key"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opendream.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-22T17:01:47.000Z","updated_at":"2025-06-16T14:24:33.000Z","dependencies_parsed_at":"2025-04-22T18:51:32.141Z","dependency_job_id":"205422a0-880f-401a-86b2-0637acf06840","html_url":"https://github.com/opendream/vanityssh-rust","commit_stats":null,"previous_names":["opendream/vanityssh-rust"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/opendream/vanityssh-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendream%2Fvanityssh-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendream%2Fvanityssh-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendream%2Fvanityssh-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendream%2Fvanityssh-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opendream","download_url":"https://codeload.github.com/opendream/vanityssh-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendream%2Fvanityssh-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","key-generation","rust","ssh","vanity-key"],"created_at":"2026-01-16T16:40:01.318Z","updated_at":"2026-01-16T16:40:01.383Z","avatar_url":"https://github.com/opendream.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VanitySSH\n\n[![Build Status](https://github.com/opendream/vanityssh-rust/actions/workflows/ci.yml/badge.svg)](https://github.com/opendream/vanityssh-rust/actions/workflows/ci.yml)\n[![Security](https://github.com/opendream/vanityssh-rust/actions/workflows/security.yml/badge.svg)](https://github.com/opendream/vanityssh-rust/actions/workflows/security.yml)\n[![Security Alerts](https://github.com/opendream/vanityssh-rust/actions/workflows/security-alerts.yml/badge.svg)](https://github.com/opendream/vanityssh-rust/actions/workflows/security-alerts.yml)\n\nGenerate SSH key pairs whose public keys match a user-specified regex pattern. This tool creates ed25519 SSH keys with OpenSSH-compatible formatting and searches for keys that match custom patterns in their base64-encoded representation.\n\n## Features\n- Customizable regex pattern matching for public keys\n- Multi-threaded execution for faster key generation (20-50x speedup on multi-core systems)\n- OpenSSH-compatible key output ready for immediate use\n- Optional comment in the public key\n- Streaming mode to continue searching for more matches\n- Case-sensitive or case-insensitive matching\n- Real-time performance metrics display\n\n## Installation\n\nClone the repository and build with Cargo:\n\n```sh\ngit clone https://github.com/opendream/vanityssh-rust.git\ncd vanityssh-rust\ncargo build --release\n```\n\n## Usage\n\n```\nUsage: vanityssh-rust \u003cpattern\u003e [OPTIONS]\n  pattern         : Regex pattern to match against the generated keys\n  --streaming     : Continue generating keys after a match is found\n  --comment       : Add a comment to the SSH public key\n  --case-sensitive: Make pattern matching case-sensitive (default is case-insensitive)\n  --threads \u003cN\u003e   : Number of threads to use (default: number of CPU cores)\n  --help          : Display this help message\n```\n\n### Examples\n\n#### Find a key whose public key starts with 'abc':\n```sh\n./target/release/vanityssh-rust '^abc'\n```\n\n#### Find a key with a case-sensitive pattern and add a comment:\n```sh\n./target/release/vanityssh-rust 'MyPattern' --case-sensitive --comment \"mykey@host\"\n```\n\n#### Use 8 threads and keep searching for more matches (streaming):\n```sh\n./target/release/vanityssh-rust 'test' --threads 8 --streaming\n```\n\n## Understanding the Output\n\nWhen a matching key is found, VanitySSH outputs:\n- The timestamp when the match was found\n- The number of key attempts before finding the match\n- Which thread found the match\n- The public key in standard OpenSSH format\n- The private key in OpenSSH format\n- Current performance metrics\n\nExample output:\n```\n[2023-05-15 14:32:21] Match found after 5432 attempts by thread 3!\nPublic Key:  ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHcMBrUGjR1/j9AcddUky9vLQKsvdvFe+wFg/q8j3+MD vanityssh-key\nPrivate Key:\n-----BEGIN OPENSSH PRIVATE KEY-----\n...private key content...\n-----END OPENSSH PRIVATE KEY-----\nPerformance: 15.21 keys/sec, 5432 attempts, 1 matches, elapsed: 357.1 sec\n```\n\n## Pattern Matching Details\n\nThe pattern is applied to the base64-encoded portion of the OpenSSH public key. By default, the matching is case-insensitive, which can be changed with the `--case-sensitive` option.\n\nSome examples of patterns:\n- `^abc`: Keys starting with \"abc\"\n- `xyz$`: Keys ending with \"xyz\"\n- `[0-9]{4}`: Keys containing four consecutive digits\n- `(foo|bar)`: Keys containing either \"foo\" or \"bar\"\n\nKeep in mind that more complex or specific patterns will take longer to match.\n\n## Performance Considerations\n\n- Performance is measured in keys generated per second\n- Multi-threading provides significant speedup on multi-core systems\n- Key generation is CPU-intensive; expect high CPU usage\n- The more specific your pattern, the longer it will take to find a match\n- Use `--threads` to control CPU utilization if needed\n\n## Security\n\nVanitySSH prioritizes security in SSH key generation:\n\n### 🔒 Cryptographic Security\n- **Ed25519 Only**: Uses only Ed25519 cryptographic keys (considered one of the most secure elliptic curve algorithms)\n- **Secure Random Generation**: Uses OS-provided cryptographically secure random number generation\n- **Memory Safety**: Written in Rust for memory safety guarantees\n- **No Key Storage**: Generated keys are never stored during the generation process\n\n### 🛡️ Automated Security\n- **Daily Security Scans**: Automated vulnerability scanning with `cargo-audit`\n- **Security Alerts**: Automatic issue creation for new vulnerabilities\n- **Dependency Updates**: Dependabot automatically updates dependencies for security patches\n- **CodeQL Analysis**: Advanced static analysis for security vulnerabilities\n- **SARIF Reporting**: Security findings integrated with GitHub Security tab\n- **Multi-platform Scanning**: Security checks across Linux, macOS, and Windows\n\n### 📋 Security Policy\nFor security issues or questions:\n- **Security Policy**: See [SECURITY.md](SECURITY.md) for our complete security policy\n- **Vulnerability Reporting**: Email security issues to [keng@opendream.co.th](mailto:keng@opendream.co.th)\n- **Security Updates**: Monitor our [Security Advisories](https://github.com/opendream/vanityssh-rust/security/advisories)\n\n## Using Generated Keys\n\nThe generated keys are standard OpenSSH Ed25519 keys that can be used immediately:\n\n1. Save the private key to a file (e.g., `id_ed25519`)\n2. Save the public key to a file (e.g., `id_ed25519.pub`)\n3. Set appropriate permissions: `chmod 600 id_ed25519`\n4. Use the key as you would any SSH key\n\n## Troubleshooting\n\n### Common Issues\n\n- **Slow key generation**: Try increasing the thread count or simplifying your pattern\n- **No matches found**: Your pattern might be too specific; try a simpler pattern\n- **High CPU usage**: This is normal; reduce thread count if needed\n- **Compile errors**: Ensure you have the latest Rust toolchain and required dependencies\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendream%2Fvanityssh-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopendream%2Fvanityssh-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendream%2Fvanityssh-rust/lists"}