| ... | ... | @@ -15,12 +15,12 @@ pub const ChaCha20IETF = ChaChaIETF(20); |
| 15 | 15 | |
| 16 | 16 | /// IETF-variant of the ChaCha20 stream cipher, reduced to 12 rounds. |
| 17 | 17 | /// Reduced-rounds versions are faster than the full-round version, but have a lower security margin. |
| 18 | | /// However, ChaCha is still believed to have a comfortable security even with only with 8 rounds. |
| 18 | /// However, ChaCha is still believed to have a comfortable security even with only 8 rounds. |
| 19 | 19 | pub const ChaCha12IETF = ChaChaIETF(12); |
| 20 | 20 | |
| 21 | 21 | /// IETF-variant of the ChaCha20 stream cipher, reduced to 8 rounds. |
| 22 | 22 | /// Reduced-rounds versions are faster than the full-round version, but have a lower security margin. |
| 23 | | /// However, ChaCha is still believed to have a comfortable security even with only with 8 rounds. |
| 23 | /// However, ChaCha is still believed to have a comfortable security even with only 8 rounds. |
| 24 | 24 | pub const ChaCha8IETF = ChaChaIETF(8); |
| 25 | 25 | |
| 26 | 26 | /// Original ChaCha20 stream cipher. |
| ... | ... | @@ -28,12 +28,12 @@ pub const ChaCha20With64BitNonce = ChaChaWith64BitNonce(20); |
| 28 | 28 | |
| 29 | 29 | /// Original ChaCha20 stream cipher, reduced to 12 rounds. |
| 30 | 30 | /// Reduced-rounds versions are faster than the full-round version, but have a lower security margin. |
| 31 | | /// However, ChaCha is still believed to have a comfortable security even with only with 8 rounds. |
| 31 | /// However, ChaCha is still believed to have a comfortable security even with only 8 rounds. |
| 32 | 32 | pub const ChaCha12With64BitNonce = ChaChaWith64BitNonce(12); |
| 33 | 33 | |
| 34 | 34 | /// Original ChaCha20 stream cipher, reduced to 8 rounds. |
| 35 | 35 | /// Reduced-rounds versions are faster than the full-round version, but have a lower security margin. |
| 36 | | /// However, ChaCha is still believed to have a comfortable security even with only with 8 rounds. |
| 36 | /// However, ChaCha is still believed to have a comfortable security even with only 8 rounds. |
| 37 | 37 | pub const ChaCha8With64BitNonce = ChaChaWith64BitNonce(8); |
| 38 | 38 | |
| 39 | 39 | /// XChaCha20 (nonce-extended version of the IETF ChaCha20 variant) stream cipher |
| ... | ... | @@ -41,12 +41,12 @@ pub const XChaCha20IETF = XChaChaIETF(20); |
| 41 | 41 | |
| 42 | 42 | /// XChaCha20 (nonce-extended version of the IETF ChaCha20 variant) stream cipher, reduced to 12 rounds |
| 43 | 43 | /// Reduced-rounds versions are faster than the full-round version, but have a lower security margin. |
| 44 | | /// However, ChaCha is still believed to have a comfortable security even with only with 8 rounds. |
| 44 | /// However, ChaCha is still believed to have a comfortable security even with only 8 rounds. |
| 45 | 45 | pub const XChaCha12IETF = XChaChaIETF(12); |
| 46 | 46 | |
| 47 | 47 | /// XChaCha20 (nonce-extended version of the IETF ChaCha20 variant) stream cipher, reduced to 8 rounds |
| 48 | 48 | /// Reduced-rounds versions are faster than the full-round version, but have a lower security margin. |
| 49 | | /// However, ChaCha is still believed to have a comfortable security even with only with 8 rounds. |
| 49 | /// However, ChaCha is still believed to have a comfortable security even with only 8 rounds. |
| 50 | 50 | pub const XChaCha8IETF = XChaChaIETF(8); |
| 51 | 51 | |
| 52 | 52 | /// ChaCha20-Poly1305 authenticated cipher, as designed for TLS |
| ... | ... | @@ -54,12 +54,12 @@ pub const ChaCha20Poly1305 = ChaChaPoly1305(20); |
| 54 | 54 | |
| 55 | 55 | /// ChaCha20-Poly1305 authenticated cipher, reduced to 12 rounds |
| 56 | 56 | /// Reduced-rounds versions are faster than the full-round version, but have a lower security margin. |
| 57 | | /// However, ChaCha is still believed to have a comfortable security even with only with 8 rounds. |
| 57 | /// However, ChaCha is still believed to have a comfortable security even with only 8 rounds. |
| 58 | 58 | pub const ChaCha12Poly1305 = ChaChaPoly1305(12); |
| 59 | 59 | |
| 60 | 60 | /// ChaCha20-Poly1305 authenticated cipher, reduced to 8 rounds |
| 61 | 61 | /// Reduced-rounds versions are faster than the full-round version, but have a lower security margin. |
| 62 | | /// However, ChaCha is still believed to have a comfortable security even with only with 8 rounds. |
| 62 | /// However, ChaCha is still believed to have a comfortable security even with only 8 rounds. |
| 63 | 63 | pub const ChaCha8Poly1305 = ChaChaPoly1305(8); |
| 64 | 64 | |
| 65 | 65 | /// XChaCha20-Poly1305 authenticated cipher |
| ... | ... | @@ -67,12 +67,12 @@ pub const XChaCha20Poly1305 = XChaChaPoly1305(20); |
| 67 | 67 | |
| 68 | 68 | /// XChaCha20-Poly1305 authenticated cipher |
| 69 | 69 | /// Reduced-rounds versions are faster than the full-round version, but have a lower security margin. |
| 70 | | /// However, ChaCha is still believed to have a comfortable security even with only with 8 rounds. |
| 70 | /// However, ChaCha is still believed to have a comfortable security even with only 8 rounds. |
| 71 | 71 | pub const XChaCha12Poly1305 = XChaChaPoly1305(12); |
| 72 | 72 | |
| 73 | 73 | /// XChaCha20-Poly1305 authenticated cipher |
| 74 | 74 | /// Reduced-rounds versions are faster than the full-round version, but have a lower security margin. |
| 75 | | /// However, ChaCha is still believed to have a comfortable security even with only with 8 rounds. |
| 75 | /// However, ChaCha is still believed to have a comfortable security even with only 8 rounds. |
| 76 | 76 | pub const XChaCha8Poly1305 = XChaChaPoly1305(8); |
| 77 | 77 | |
| 78 | 78 | // Vectorized implementation of the core function |