{"id":18083188,"url":"https://github.com/rustaceanrob/chacha20","last_synced_at":"2025-04-05T23:15:01.810Z","repository":{"id":225895596,"uuid":"766347057","full_name":"rustaceanrob/chacha20","owner":"rustaceanrob","description":"zero dependency, stack allocated ChaCha20 implementation","archived":false,"fork":false,"pushed_at":"2024-03-12T20:13:21.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T06:47:38.717Z","etag":null,"topics":["chacha20","cryptography","stack-allocated","stream-cipher"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rust_chacha20","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/rustaceanrob.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}},"created_at":"2024-03-03T02:14:39.000Z","updated_at":"2024-08-07T07:00:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d3bd27a-0be0-4563-8644-97af4b253a0d","html_url":"https://github.com/rustaceanrob/chacha20","commit_stats":null,"previous_names":["rustaceanrob/chacha20"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustaceanrob%2Fchacha20","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustaceanrob%2Fchacha20/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustaceanrob%2Fchacha20/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustaceanrob%2Fchacha20/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustaceanrob","download_url":"https://codeload.github.com/rustaceanrob/chacha20/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411238,"owners_count":20934654,"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","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":["chacha20","cryptography","stack-allocated","stream-cipher"],"created_at":"2024-10-31T14:07:09.712Z","updated_at":"2025-04-05T23:15:01.801Z","avatar_url":"https://github.com/rustaceanrob.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ChaCha20\n\nA Rust implementation of the ChaCha20 stream cipher. Complete with simple, auditable code.\n\n#### Features\n\n- [x] Stack-allocated\n- [x] No unsafe code blocks\n- [x] Zero dependencies\n- [x] Seek an index in the keystream or a block in the keystream.\n\n#### Usage\n\n```rust\nuse chacha20::ChaCha20;\nlet key = hex::decode(\"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f\").unwrap();\nlet key: [u8; 32] = key.try_into().unwrap();\nlet nonce = hex::decode(\"000000000000004a00000000\").unwrap();\nlet nonce: [u8; 12] = nonce.try_into().unwrap();\nlet seek = 42; // start the cipher at the 42nd index\nlet mut chacha = ChaCha20::new(key, nonce, seek);\nlet mut binding = *b\"Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it.\";\nlet to = binding.as_mut_slice();\nchacha.apply_keystream(to);\nchacha.seek(seek); // move the keystream index back to 42\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustaceanrob%2Fchacha20","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustaceanrob%2Fchacha20","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustaceanrob%2Fchacha20/lists"}