Commit 432f094
Check length when importing raw X25519 and Ed25519 keys (#410)
RFC7748 and RFC8032 specify that X25519 and Ed25519 public keys are
32 bytes/256 bits. The spec, however, does not explicitly reject raw
keys of different lengths. This patch adds checks for the length.
This behavior is already being tested for by WPT and implementations
already throw a DataError in such cases.
Co-authored-by: Daniel Huigens <d.huigens@protonmail.com>1 parent 37f41ce commit 432f094
1 file changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10931 | 10931 | | |
10932 | 10932 | | |
10933 | 10933 | | |
| 10934 | + | |
| 10935 | + | |
| 10936 | + | |
| 10937 | + | |
| 10938 | + | |
| 10939 | + | |
| 10940 | + | |
10934 | 10941 | | |
10935 | 10942 | | |
10936 | 10943 | | |
| |||
11775 | 11782 | | |
11776 | 11783 | | |
11777 | 11784 | | |
| 11785 | + | |
| 11786 | + | |
| 11787 | + | |
| 11788 | + | |
| 11789 | + | |
| 11790 | + | |
| 11791 | + | |
11778 | 11792 | | |
11779 | 11793 | | |
11780 | 11794 | | |
| |||
0 commit comments