Commit 4c49ea4
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 c4c71ee commit 4c49ea4
2 files changed
Lines changed: 18 additions & 4 deletions
| 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 | |
|---|---|---|---|
| |||
3437 | 3437 | | |
3438 | 3438 | | |
3439 | 3439 | | |
3440 | | - | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
3441 | 3449 | | |
3442 | 3450 | | |
3443 | 3451 | | |
| |||
3837 | 3845 | | |
3838 | 3846 | | |
3839 | 3847 | | |
3840 | | - | |
3841 | | - | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
3842 | 3855 | | |
3843 | 3856 | | |
3844 | 3857 | | |
| |||
0 commit comments