Commit 171301c
Fix:
* * Fixed ChaCha20 could only generate 256 different seeds for number seed values.
* Added `chacha20NumberSeedLegacyBehaviour` to restore the legacy behaviour (`false` by default)
* Added test for new ChaCha20 seed generator behaviour.
* Lint fixes
* Added `chacha20-seed-unexpected-rounding-fix.md`.
* Updated `chacha20-seed-unexpected-rounding-fix.md`
* Update unreleased/chacha20-seed-unexpected-rounding-fix.md
Co-authored-by: Take-John <takejohn@takejohn.jp>
* Renamed `chacha20NumberSeedLegacyBehaviour` to `chacha20_number_seed_legacy_behavior`
* Update unreleased/chacha20-seed-unexpected-rounding-fix.md
Co-authored-by: Take-John <takejohn@takejohn.jp>
---------
Co-authored-by: Take-John <takejohn@takejohn.jp>Math:gen_rngのseedにnumを与え、options.algorithmにchacha20を指定した或いは何も指定しなかった場合、seed & 255を内部的にseedとしてしまう問題を修正。 (#1019)1 parent b39ac83 commit 171301c
File tree
4 files changed
+47
-9
lines changed- src
- interpreter/lib
- utils/random
- test
- unreleased
4 files changed
+47
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
161 | 190 | | |
162 | 191 | | |
163 | 192 | | |
| |||
202 | 231 | | |
203 | 232 | | |
204 | 233 | | |
205 | | - | |
| 234 | + | |
206 | 235 | | |
207 | 236 | | |
208 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments