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