{"id":33926269,"url":"https://github.com/yoozzeek/geronimo-captcha","last_synced_at":"2025-12-12T10:08:57.182Z","repository":{"id":322055408,"uuid":"1052676123","full_name":"yoozzeek/geronimo-captcha","owner":"yoozzeek","description":"Secure, AI-resistant, JavaScript-free CAPTCHA built in Rust. Confuses bots, but delights humans.","archived":false,"fork":false,"pushed_at":"2025-11-02T09:57:20.000Z","size":831,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-02T11:28:48.713Z","etag":null,"topics":["captcha","no-js","random","rust","security","web"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yoozzeek.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-08T11:49:39.000Z","updated_at":"2025-11-02T09:57:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yoozzeek/geronimo-captcha","commit_stats":null,"previous_names":["yoozzeek/geronimo-captcha"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/yoozzeek/geronimo-captcha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoozzeek%2Fgeronimo-captcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoozzeek%2Fgeronimo-captcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoozzeek%2Fgeronimo-captcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoozzeek%2Fgeronimo-captcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoozzeek","download_url":"https://codeload.github.com/yoozzeek/geronimo-captcha/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoozzeek%2Fgeronimo-captcha/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27680582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-12T02:00:06.775Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["captcha","no-js","random","rust","security","web"],"created_at":"2025-12-12T10:08:56.262Z","updated_at":"2025-12-12T10:08:57.170Z","avatar_url":"https://github.com/yoozzeek.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# geronimo-captcha\n\n[![CI](https://github.com/yoozzeek/geronimo-captcha/actions/workflows/ci.yml/badge.svg)](https://github.com/yoozzeek/geronimo-captcha/actions/workflows/ci.yml)\n[![Crates.io](https://img.shields.io/crates/v/geronimo-captcha.svg)](https://crates.io/crates/geronimo-captcha)\n[![Docs.rs](https://docs.rs/geronimo-captcha/badge.svg)](https://docs.rs/geronimo-captcha)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache2-yellow.svg)](./LICENSE)\n\nSecure, AI-resistant, JavaScript-free CAPTCHA built in Rust.\nConfuses bots, but delights humans.\n\n\u003cimg src=\"./logo.jpg\" alt=\"geronimo-captcha logo\" width=\"260\"/\u003e\n\n## What it does\n\n- Renders a 3×3 sprite with one correctly oriented tile\n- Random jitter, label offset, colored noise, JPEG artifacts\n- Stateless HMAC-signed challenge id with TTL\n\n### Challenge examples\n\n\u003cimg src=\"./examples/examples-sprite.jpg\" alt=\"Challenge examples\" width=\"580\"/\u003e\n\n## Roadmap\n\n- [x] Captcha core, image and sprite generation helpers\n- [x] In-memory challenge registry impl\n- [x] Sprite as binary (in addition to base64)\n- [x] WebP format (in addition to JPEG)\n- [ ] Code examples, demo webpage\n- [ ] Custom fonts and sample sets\n- [ ] Redis challenge registry impl\n\n## Generate and verify\n\n```rust\nuse geronimo_captcha::{\n    CaptchaManager, ChallengeInMemoryRegistry,\n    GenerationOptions, NoiseOptions,\n    SpriteFormat, SpriteUri, SpriteBinary\n};\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let ttl_secs = 60;\n    let registry = std::sync::Arc::new(ChallengeInMemoryRegistry::new(ttl_secs, 3));\n    let noise = NoiseOptions::default();\n    let gen = GenerationOptions {\n        cell_size: 150,\n        sprite_format: SpriteFormat::Jpeg {\n            quality: 70,\n        },\n        limits: None,\n    };\n\n    let secret = \"your-secret-key\".to_string();\n    let mgr = CaptchaManager::new(secret, ttl_secs, noise, Some(registry), gen);\n    let challenge = mgr.generate_challenge::\u003cSpriteUri\u003e()?;\n\n    // Generate sprite as binary if needed\n    // let challenge = mgr.generate_challenge_with::\u003cSpriteBinary\u003e()?;\n    // let img_binary = challenge.sprite.bytes;\n\n    // Render to client\n    let img_src = challenge.sprite.0;           // data:image/*;base64,...\n    let challenge_id = challenge.challenge_id;  // send/store with form\n\n    println!(\"img_src prefix: {}\", \u0026img_src[..32.min(img_src.len())]);\n    println!(\"challenge_id: {}\", challenge_id);\n\n    // Normally you get these from the client in your API handlers/routes\n    let client_challenge_id = \"nonce:1730534400:BASE64_HMAC\".to_string();\n    let client_choice_idx: u8 = 7;\n\n    let ok = mgr.verify_challenge(\u0026client_challenge_id, client_choice_idx)?;\n    println!(\"verified: {ok}\");\n\n    Ok(())\n}\n```\n\n## Benchmarks\n\n### 100px/cell; q=70\n\n- Verify: ~2.5 µs\n- JPEG generate:\n    - ~6.7 ms\n    - ~5.0 ms (parallel)\n- WebP generate:\n    - ~11.5 ms\n    - ~10.7 ms (parallel)\n\n_Apple M3 Max_\n\nHow to run:\n\n```bash\ncargo bench --bench captcha -- --noplot\ncargo bench --bench captcha --features parallel -- --noplot\n```\n\n## License\n\nThis project is licensed under the Apache 2.0 License. See [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoozzeek%2Fgeronimo-captcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoozzeek%2Fgeronimo-captcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoozzeek%2Fgeronimo-captcha/lists"}