Commit 1edcdc0
committed
Fix ChaCha20-Poly1305 and RSA-OAEP to allow empty plaintext
ChaCha20-Poly1305 Final() rejected the READY state (no data or AAD
provided), though RFC 8439 §2.8 explicitly permits empty plaintext
and produces a well-defined authentication tag.
RSA-OAEP rejected zero-length plaintexts at both encrypt and decrypt.
RFC 8017 §7.1.1 permits empty messages; OpenSSL and BoringSSL both
accept them.
Found via Wycheproof test vectors.1 parent d343ea6 commit 1edcdc0
2 files changed
+18
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
| 279 | + | |
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3354 | 3354 | | |
3355 | 3355 | | |
3356 | 3356 | | |
3357 | | - | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
3358 | 3366 | | |
3359 | 3367 | | |
3360 | 3368 | | |
| |||
3752 | 3760 | | |
3753 | 3761 | | |
3754 | 3762 | | |
3755 | | - | |
3756 | | - | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
3757 | 3770 | | |
3758 | 3771 | | |
3759 | 3772 | | |
| |||
0 commit comments