{"id":22820152,"url":"https://github.com/kizzycode/crypto_api_chachapoly","last_synced_at":"2025-07-25T17:39:02.952Z","repository":{"id":57613565,"uuid":"174596892","full_name":"KizzyCode/crypto_api_chachapoly","owner":"KizzyCode","description":"This crate implements ChaCha20-IETF, Poly1305 and ChachaPoly-IETF for `crypto_api`","archived":false,"fork":false,"pushed_at":"2021-10-15T00:42:22.000Z","size":127,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T20:23:31.214Z","etag":null,"topics":["aead","chacha20","chacha20-poly1305","crypto","poly1305"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KizzyCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE BSD 2-CLAUSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-08T19:29:27.000Z","updated_at":"2021-10-15T00:42:25.000Z","dependencies_parsed_at":"2022-09-05T15:23:46.015Z","dependency_job_id":null,"html_url":"https://github.com/KizzyCode/crypto_api_chachapoly","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KizzyCode%2Fcrypto_api_chachapoly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KizzyCode%2Fcrypto_api_chachapoly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KizzyCode%2Fcrypto_api_chachapoly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KizzyCode%2Fcrypto_api_chachapoly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KizzyCode","download_url":"https://codeload.github.com/KizzyCode/crypto_api_chachapoly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250345066,"owners_count":21415246,"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":["aead","chacha20","chacha20-poly1305","crypto","poly1305"],"created_at":"2024-12-12T15:16:42.932Z","updated_at":"2025-04-23T00:23:57.875Z","avatar_url":"https://github.com/KizzyCode.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![docs.rs](https://docs.rs/crypto_api_chachapoly/badge.svg)](https://docs.rs/crypto_api_chachapoly)\n[![License BSD-2-Clause](https://img.shields.io/badge/License-BSD--2--Clause-blue.svg)](https://opensource.org/licenses/BSD-2-Clause)\n[![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![crates.io](https://img.shields.io/crates/v/crypto_api_chachapoly.svg)](https://crates.io/crates/crypto_api_chachapoly)\n[![Download numbers](https://img.shields.io/crates/d/crypto_api_chachapoly.svg)](https://crates.io/crates/crypto_api_chachapoly)\n[![AppVeyor CI](https://ci.appveyor.com/api/projects/status/github/KizzyCode/crypto_api_chachapoly?svg=true)](https://ci.appveyor.com/project/KizzyCode/crypto-api-chachapoly)\n[![dependency status](https://deps.rs/crate/crypto_api_chachapoly/0.5.0/status.svg)](https://deps.rs/crate/crypto_api_chachapoly/0.5.0)\n\n# crypto_api_chachapoly\nWelcome to `crypto_api_chachapoly` 🎉\n\n\n## About\nThis crate implements\n[the IETF version of ChaCha20](https://tools.ietf.org/html/rfc8439#section-2.4), XChaCha20,\n[Poly1305](https://tools.ietf.org/html/rfc8439#section-2.5),\n[ChachaPoly-IETF AEAD construction](https://tools.ietf.org/html/rfc8439#section-2.8) and \nXChachaPoly.\n\n\n## Security\n⚠️ Some words of warning ahead: This library has not been audited yet – use at your own risk! ⚠️\n\nHowever we try to do things right from the start – this library does not use unsafe Rust, is\n[KISS](https://en.wikipedia.org/wiki/KISS_principle), tested against various test vectors and uses\nconstant time implementations only.\n\n### Test Vectors\nAll implementations pass all reference test vectors and are assumed to produce correct results even\nin corner cases. We also use API test vectors (to test input validation) and failure test vectors to\ntest our MAC verification.\n\n### Fuzzing Against [`sodiumoxide`](https://crates.io/crates/sodiumoxide)\nThe git repository contains a `fuzz`-subcrate that generates random inputs and tests if this crate\nand [`sodiumoxide`](https://crates.io/crates/sodiumoxide) produce the same result.\n\nIt can be run by cloning the git repo, going into \"fuzz/\" and running `cargo run --release`. The\ncrate uses all available CPU threads and stops only if there is an unexpected different result. You\ncan also specify the maximum length if the randomly generated and sized test input; just set \n`TEST_VECTOR_LIMIT` as environment variable. **If you find an unexpected different result, please\ncopy the entire output and create a new issue on GitHub! 😊**\n\n### Constant Time Implementations\nAll implementations are designed to be invulnerable against timing side-channel attacks by\nperforming all secret-dependent computations in constant time:\n - ChaCha20 already does this by design\n - Poly1305 is based on the \n   [public domain Poly1305-Donna implementation (32 bit version)](https://github.com/floodyberry/poly1305-donna)\n   with some ideas from [BearSSL](https://bearssl.org) (note that this implementation may not be\n   constant time [on some older/low end ARM CPUs](https://bearssl.org/ctmul.html#arm))\n - The AEAD construction is also constant time by design (provided that both underlying algorithms\n   are constant time)\n\nFor more information about constant time implementations, take a look\n[here](https://bearssl.org/constanttime.html) and [here](https://bearssl.org/ctmul.html).\n\n### Memory Hygiene\n`crypto_api_chachapoly` does not perform any attempts to erase sensitive contents from memory.\nHowever all sensitive contents are stored in heap-allocated memory, so if you're using an erasing\nmemory-allocator like [MAProper](https://crates.io/crates/ma_proper) they will be erased nontheless.\n\nUsing an erasing memory allocator is a good idea anyway, because Rust makes it pretty hard to keep\ntrack on how the memory is managed under the hood – the memory allocator on the other hand sees\neverything that happens on the heap and can take care of it accordingly.\n\n\n## Dependencies\nBecause this code implements the [`crypto_api`](https://github.com/KizzyCode/crypto_api), it depends\non the `crypto_api`-crate. Otherwise, it's dependency less.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkizzycode%2Fcrypto_api_chachapoly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkizzycode%2Fcrypto_api_chachapoly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkizzycode%2Fcrypto_api_chachapoly/lists"}