{"id":57521,"library":"chacha20poly1305","title":"ChaCha20Poly1305","description":"Pure Rust implementation of the ChaCha20Poly1305 Authenticated Encryption with Additional Data Cipher (RFC 8439) with optional architecture-specific hardware acceleration.","status":"active","version":"0.10.1","language":"rust","source_language":null,"source_url":"https://github.com/RustCrypto/AEADs","tags":["cryptography","aead","chacha20","poly1305","encryption","rfc-8439"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nchacha20poly1305 = \"0.10.1\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add chacha20poly1305","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"ChaCha20Poly1305","correct":"use chacha20poly1305::ChaCha20Poly1305;"}],"quickstart":{"code":"use chacha20poly1305::ChaCha20Poly1305;\nuse chacha20poly1305::aead::{Aead, KeyInit, Nonce};\n\nlet key = ChaCha20Poly1305::generate_key(&mut rand::thread_rng());\nlet cipher = ChaCha20Poly1305::new(&key);\nlet nonce = Nonce::from_slice(b\"unique nonce\");\nlet ciphertext = cipher.encrypt(nonce, b\"plaintext\").expect(\"encryption failure\");\nprintln!(\"Encrypted: {:?}\", ciphertext);","lang":"rust","description":"Encrypts a plaintext using ChaCha20Poly1305 with a random key and a nonce."},"warnings":[{"fix":"Add `rand_core` as a dependency or use `ChaCha20Poly1305::new_from_slice` with a pre-generated key.","message":"Requires the `rand_core` feature for key generation; otherwise, you must provide a key manually.","severity":"gotcha","affected_versions":">=0.10.0"}],"env_vars":null,"search_vec":"'-8439':29 '8439':15 'acceler':22 'addit':11 'aead':24 'architectur':19 'architecture-specif':18 'authent':8 'chacha20':25 'chacha20poly1305':1,7 'cipher':13 'cryptographi':23 'data':12 'encrypt':9,27 'hardwar':21 'implement':4 'option':17 'poly1305':26 'pure':2 'rfc':14,28 'rust':3 'specif':20","created_at":"2026-06-16T15:45:55.447557+00:00","updated_at":"2026-06-16T15:45:55.447557+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/RustCrypto/AEADs/tree/master/chacha20poly1305","github":"https://github.com/RustCrypto/AEADs","docs":"https://docs.rs/chacha20poly1305/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["crypto"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}