Commit 0d32399
authored
Generalise ML-DSA with GYB (#355)
Generalises the definition of ML-DSA algorithms with GYB to allow the
addition of other parameter sets in the future
### Checklist
- [X] I've run tests to see all new and existing tests pass
- [X] I've followed the code style of the rest of the project
- [X] I've read the [Contribution Guidelines](CONTRIBUTING.md)
- [X] I've updated the documentation if necessary
#### If you've made changes to `gyb` files
- [X] I've run `.script/generate_boilerplate_files_with_gyb` and
included updated generated files in a commit of this pull request
### Motivation:
BoringSSL recently [made ML-DSA-87
public](https://boringssl.googlesource.com/boringssl/+/2a514a51baebd5a232fc64f7b082f7a8b28cd29d)
in its API, in addition to ML-DSA-65 which has already been [integrated
into Swift Crypto](#267).
By generating the code with GYB we will be able to add support for
ML-DSA-87 very easily in the future when the vendored version of
BoringSSL is updated.
### Modifications:
Generate the code for `MLDSA65` (and in future also for `MLDSA87`) with
GYB.
### Result:
Nothing changes in the public API, but adding `MLDSA87` in the future
will be instantaneous.1 parent d4d7fef commit 0d32399
File tree
3 files changed
+354
-11
lines changed- Sources/_CryptoExtras
- MLDSA
3 files changed
+354
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
Lines changed: 16 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
89 | | - | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| |||
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
105 | | - | |
| 109 | + | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| |||
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
116 | | - | |
| 120 | + | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| |||
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
128 | | - | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
175 | | - | |
| 179 | + | |
176 | 180 | | |
177 | 181 | | |
178 | 182 | | |
| |||
311 | 315 | | |
312 | 316 | | |
313 | 317 | | |
314 | | - | |
| 318 | + | |
315 | 319 | | |
316 | 320 | | |
317 | 321 | | |
318 | 322 | | |
319 | 323 | | |
320 | 324 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | 325 | | |
325 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
326 | 332 | | |
0 commit comments