| 1 |
chachapoly: Chacha+Poly1305-based authenticated stream cipher |
| 2 |
|
| 3 |
This module provides Chacha20-Poly1305 and XChacha20-Poly1305 stream |
| 4 |
implementations as described in RFC 8439. |
| 5 |
|
| 6 |
A stream is created with [[chachapoly]]. [[init]] initializes a stream as a |
| 7 |
Chacha20-Poly1305 one where [[xinit]] will initialize it as a |
| 8 |
XChacha20-Poly1305 stream. After initializiation data can be encrypted by |
| 9 |
writing to or decrypted by reading from the stream. The user must call [[seal]] |
| 10 |
when encryption is done to create the authentication tag and [[verify]] in case |
| 11 |
of decryption to check if the dercypted data is valid. If the data is invalid |
| 12 |
it must not be processed further. |
| 13 |
|
| 14 |
This is a low-level module which implements cryptographic primitives. Direct use |
| 15 |
of cryptographic primitives is not recommended for non-experts, as incorrect use |
| 16 |
of these primitives can easily lead to the introduction of security |
| 17 |
vulnerabilities. Non-experts are advised to use the high-level operations |
| 18 |
available in the top-level [[crypto::]] module. |
| 19 |
|
| 20 |
Be advised that Hare's cryptography implementations have not been audited. |