]>
Commit | Line | Data |
---|---|---|
0a29b90c FG |
1 | # Changelog |
2 | All notable changes to this project will be documented in this file. | |
3 | ||
4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | |
5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | |
6 | ||
4b012472 FG |
7 | ## 0.5.5 (2023-11-18) |
8 | ### Added | |
9 | - Multi-exponentiation ([#248]) | |
10 | - `const_assert_eq!` and `const_assert_ne!` macros ([#293]) | |
11 | ||
12 | [#248]: https://github.com/RustCrypto/crypto-bigint/pull/248 | |
13 | [#293]: https://github.com/RustCrypto/crypto-bigint/pull/293 | |
14 | ||
15 | ## 0.5.4 (2023-11-12) | |
16 | ### Added | |
17 | - `trailing_ones[_vartime]()`, `trailing_zeros_vartime()`, `leading_zeros_vartime()` ([#282]) | |
18 | - Implement `ArrayEncoding` for `U832` ([#288]) | |
19 | ||
20 | ### Changed | |
21 | - Make `Uint::random_mod()` work identically on 32- and 64-bit targets ([#285]) | |
22 | ||
23 | [#282]: https://github.com/RustCrypto/crypto-bigint/pull/282 | |
24 | [#285]: https://github.com/RustCrypto/crypto-bigint/pull/285 | |
25 | [#288]: https://github.com/RustCrypto/crypto-bigint/pull/288 | |
26 | ||
27 | ## 0.5.3 (2023-09-04) | |
28 | ### Added | |
29 | - `BoxedUint`: heap-allocated fixed-precision integers ([#221]) | |
30 | - `extra-sizes` feature ([#229]) | |
31 | - `U4224` and `U4352` ([#233]) | |
32 | - Zeroizing support for `DynResidue` ([#235]) | |
33 | - `cmp_vartime`, `ct_cmp` ([#238]) | |
34 | - Expose Montgomery form in `Residue`/`DynResidue` ([#239]) | |
35 | - Make `Uint::pow` work with different sized exponents ([#251]) | |
36 | - Expose `wrapping_neg` ([#252]) | |
37 | - Make `concat`, `split`, and multiply work with different sized operands ([#253]) | |
38 | - `U16384` and `U32768` ([#255]) | |
39 | - `Uint::{inv_mod, inv_mod2k_vartime}` ([#263]) | |
40 | - `const fn` constructors for `NonZero<Uint>` and `NonZero<Limb>` ([#266]) | |
41 | - Constant-time `Uint::shr()` and `Uint::shl()` ([#267]) | |
42 | - Subtle trait impls for `DynResidue` and `DynResidueParams` ([#269]) | |
43 | ||
44 | ### Changed | |
45 | - Modular inversion improvements ([#263]) | |
46 | ||
47 | ### Fixed | |
48 | - `serdect` usage ([#222]) | |
49 | - Enforce valid modulus for `DynResidueParams` ([#240]) | |
50 | - Enforce valid modulus for `Residue` and associated macros ([#243]) | |
51 | - Make `Uint::{from_be_hex, from_le_hex}` constant-time ([#254]) | |
52 | - Remove conditionals in `Uint::saturating_add()` and `saturating_mul()` ([#256]) | |
53 | - More logical checks in the `Uint::random_mod()` test ([#256]) | |
54 | - Mark `sqrt` for renaming, to explicitly describe it as vartime ([#256]) | |
55 | ||
56 | [#221]: https://github.com/RustCrypto/crypto-bigint/pull/221 | |
57 | [#222]: https://github.com/RustCrypto/crypto-bigint/pull/222 | |
58 | [#229]: https://github.com/RustCrypto/crypto-bigint/pull/229 | |
59 | [#233]: https://github.com/RustCrypto/crypto-bigint/pull/233 | |
60 | [#235]: https://github.com/RustCrypto/crypto-bigint/pull/235 | |
61 | [#238]: https://github.com/RustCrypto/crypto-bigint/pull/238 | |
62 | [#239]: https://github.com/RustCrypto/crypto-bigint/pull/239 | |
63 | [#240]: https://github.com/RustCrypto/crypto-bigint/pull/240 | |
64 | [#243]: https://github.com/RustCrypto/crypto-bigint/pull/243 | |
65 | [#251]: https://github.com/RustCrypto/crypto-bigint/pull/251 | |
66 | [#252]: https://github.com/RustCrypto/crypto-bigint/pull/252 | |
67 | [#253]: https://github.com/RustCrypto/crypto-bigint/pull/253 | |
68 | [#254]: https://github.com/RustCrypto/crypto-bigint/pull/254 | |
69 | [#255]: https://github.com/RustCrypto/crypto-bigint/pull/255 | |
70 | [#256]: https://github.com/RustCrypto/crypto-bigint/pull/256 | |
71 | [#263]: https://github.com/RustCrypto/crypto-bigint/pull/263 | |
72 | [#266]: https://github.com/RustCrypto/crypto-bigint/pull/266 | |
73 | [#267]: https://github.com/RustCrypto/crypto-bigint/pull/267 | |
74 | [#269]: https://github.com/RustCrypto/crypto-bigint/pull/269 | |
75 | ||
fe692bf9 FG |
76 | ## 0.5.2 (2023-04-26) |
77 | ### Added | |
78 | - Expose residue params and modulus in `DynResidue` ([#197]) | |
79 | - Impl `DefaultIsZeroes` for `Residue` ([#210]) | |
80 | - `div_by_2()` method for integers in Montgomery form ([#211], [#212]) | |
81 | ||
82 | ### Changed | |
83 | - Montgomery multiplication improvements ([#203]) | |
84 | ||
85 | [#197]: https://github.com/RustCrypto/crypto-bigint/pull/197 | |
86 | [#203]: https://github.com/RustCrypto/crypto-bigint/pull/203 | |
87 | [#210]: https://github.com/RustCrypto/crypto-bigint/pull/210 | |
88 | [#211]: https://github.com/RustCrypto/crypto-bigint/pull/211 | |
89 | [#212]: https://github.com/RustCrypto/crypto-bigint/pull/212 | |
90 | ||
49aad941 FG |
91 | ## 0.5.1 (2023-03-13) |
92 | ### Changed | |
93 | - Improve `Debug` impls on `Limb` and `Uint` ([#195]) | |
94 | ||
95 | ### Fixed | |
96 | - `const_residue` macro accessibility bug ([#193]) | |
97 | ||
98 | [#193]: https://github.com/RustCrypto/crypto-bigint/pull/193 | |
99 | [#195]: https://github.com/RustCrypto/crypto-bigint/pull/195 | |
100 | ||
101 | ## 0.5.0 (2023-02-27) | |
102 | ### Added | |
103 | - `Residue`: modular arithmetic with static compile-time moduli ([#130]) | |
104 | - `DynResidue`: modular arithmetic with dynamic runtime moduli ([#134]) | |
105 | - Constant-time division by a single `Limb` ([#141]) | |
106 | - Windowed exponentiation for `(Dyn)Residue` ([#147]) | |
107 | - `SubResidue` trait and impls for `Residue` and `DynResidue` ([#149]) | |
108 | - `Pow`, `Invert` and `Square` ([#155]) | |
109 | - `CtChoice` type ([#159]) | |
110 | - `BITS`, `BYTES`, and `LIMBS` to `Integer` trait ([#161]) | |
111 | - Impl `Random` for `Wrapping` ([#168]) | |
112 | - Support to concat `U320` and `U640` ([#173]) | |
113 | - Define `U224` and `U544` on 32-bit platforms ([#179], [#180]) | |
114 | ||
115 | ### Changed | |
116 | - Rename `UInt` -> `Uint` ([#143]) | |
117 | - Rename `Uint` methods ([#144]) | |
118 | - `limbs` -> `as_limbs` | |
119 | - `limbs_mut` -> `as_limbs_mut` | |
120 | - `into_limbs` -> `to_limbs` | |
121 | - Faster `random_mod` ([#146]) | |
122 | - Constant-time `leading_zeros()`, `trailing_zeros()`, `bits()`, and `bit()` for `Uint` ([#153]) | |
123 | - Rename `BIT_SIZE` -> `BITS`, `BYTE_SIZE` -> `BYTES` ([#157]) | |
124 | - More efficient squaring operation ([#133]) | |
125 | - Use `CryptoRngCore` ([#164]) | |
126 | - Bump `serdect` to 0.2 ([#185]) | |
127 | - Bump `der` dependency to v0.7; MSRV 1.65 ([#187]) | |
128 | ||
129 | ### Fixed | |
130 | - Integer overflow in `div2by1()` ([#156]) | |
131 | - Convert from tuple element ordering ([#183]) | |
132 | ||
133 | [#130]: https://github.com/RustCrypto/crypto-bigint/pull/130 | |
134 | [#134]: https://github.com/RustCrypto/crypto-bigint/pull/134 | |
135 | [#141]: https://github.com/RustCrypto/crypto-bigint/pull/141 | |
136 | [#143]: https://github.com/RustCrypto/crypto-bigint/pull/143 | |
137 | [#144]: https://github.com/RustCrypto/crypto-bigint/pull/144 | |
138 | [#146]: https://github.com/RustCrypto/crypto-bigint/pull/146 | |
139 | [#147]: https://github.com/RustCrypto/crypto-bigint/pull/147 | |
140 | [#149]: https://github.com/RustCrypto/crypto-bigint/pull/149 | |
141 | [#153]: https://github.com/RustCrypto/crypto-bigint/pull/153 | |
142 | [#155]: https://github.com/RustCrypto/crypto-bigint/pull/155 | |
143 | [#156]: https://github.com/RustCrypto/crypto-bigint/pull/156 | |
144 | [#157]: https://github.com/RustCrypto/crypto-bigint/pull/157 | |
145 | [#159]: https://github.com/RustCrypto/crypto-bigint/pull/159 | |
146 | [#161]: https://github.com/RustCrypto/crypto-bigint/pull/161 | |
147 | [#164]: https://github.com/RustCrypto/crypto-bigint/pull/164 | |
148 | [#168]: https://github.com/RustCrypto/crypto-bigint/pull/168 | |
149 | [#173]: https://github.com/RustCrypto/crypto-bigint/pull/173 | |
150 | [#179]: https://github.com/RustCrypto/crypto-bigint/pull/179 | |
151 | [#180]: https://github.com/RustCrypto/crypto-bigint/pull/180 | |
152 | [#183]: https://github.com/RustCrypto/crypto-bigint/pull/183 | |
153 | [#185]: https://github.com/RustCrypto/crypto-bigint/pull/185 | |
154 | [#187]: https://github.com/RustCrypto/crypto-bigint/pull/187 | |
155 | ||
0a29b90c FG |
156 | ## 0.4.9 (2022-10-11) |
157 | ### Added | |
158 | - `UInt::from_word` and `::from_wide_word` ([#105]) | |
159 | - `UInt` modulo operations for special moduli ([#108]) | |
160 | - Non-const `UInt` decoding from an array ([#110]) | |
161 | - `const fn` impls of `concat` and `split` ([#111]) | |
162 | - `Limb` left/right bitshifts ([#112]) | |
163 | - `UInt::LIMBS` constant ([#114]) | |
164 | ||
165 | ### Changed | |
166 | - Optimize `UInt::neg_mod` by simply calling `::sub_mod` ([#106]) | |
167 | - Relax bounds for `UInt::add_mod` and `::sub_mod` ([#104]) | |
168 | - Always inline `Limb::bitand` ([#109]) | |
169 | - Faster const decoding of UInt ([#113]) | |
170 | - Optimize `UInt::neg_mod` ([#127]) | |
171 | - Faster comparisons ([#128]) | |
172 | - `UInt::resize` ([#129]) | |
173 | - `UInt::bit` accessor methods ([#122]) | |
174 | ||
175 | ### Fixed | |
176 | - Constant-time behaviour for `ct_reduce`/`ct_div_rem` ([#117]) | |
177 | ||
178 | [#104]: https://github.com/RustCrypto/crypto-bigint/pull/104 | |
179 | [#105]: https://github.com/RustCrypto/crypto-bigint/pull/105 | |
180 | [#106]: https://github.com/RustCrypto/crypto-bigint/pull/106 | |
181 | [#108]: https://github.com/RustCrypto/crypto-bigint/pull/108 | |
182 | [#109]: https://github.com/RustCrypto/crypto-bigint/pull/109 | |
183 | [#110]: https://github.com/RustCrypto/crypto-bigint/pull/110 | |
184 | [#111]: https://github.com/RustCrypto/crypto-bigint/pull/111 | |
185 | [#112]: https://github.com/RustCrypto/crypto-bigint/pull/112 | |
186 | [#113]: https://github.com/RustCrypto/crypto-bigint/pull/113 | |
187 | [#114]: https://github.com/RustCrypto/crypto-bigint/pull/114 | |
188 | [#117]: https://github.com/RustCrypto/crypto-bigint/pull/117 | |
189 | [#122]: https://github.com/RustCrypto/crypto-bigint/pull/122 | |
190 | [#127]: https://github.com/RustCrypto/crypto-bigint/pull/127 | |
191 | [#128]: https://github.com/RustCrypto/crypto-bigint/pull/128 | |
192 | [#129]: https://github.com/RustCrypto/crypto-bigint/pull/129 | |
193 | ||
194 | ## 0.4.8 (2022-06-30) | |
195 | ### Added | |
196 | - `Word` as a replacement for `LimbUInt` ([#88]) | |
197 | - `WideWord` as a replacement for `WideLimbUInt` ([#88]) | |
198 | - `UInt::*_words` as a replacement for `UInt::*_uint_array` ([#88]) | |
199 | ||
200 | ### Changed | |
201 | - Deprecated `*LimbUInt` and `UInt::*_uint_array` ([#88]) | |
202 | ||
203 | [#88]: https://github.com/RustCrypto/crypto-bigint/pull/88 | |
204 | ||
205 | ## 0.4.7 (2022-06-12) | |
206 | ### Added | |
207 | - `Encoding` tests ([#93]) | |
208 | ||
209 | ### Changed | |
210 | - Use const generic impls of `*Mod` traits ([#98]) | |
211 | ||
212 | [#93]: https://github.com/RustCrypto/crypto-bigint/pull/93 | |
213 | [#98]: https://github.com/RustCrypto/crypto-bigint/pull/98 | |
214 | ||
215 | ## 0.4.6 (2022-06-12) | |
216 | ### Added | |
217 | - Impl `ArrayEncoding` for `U576` ([#96]) | |
218 | ||
219 | [#96]: https://github.com/RustCrypto/crypto-bigint/pull/96 | |
220 | ||
221 | ## 0.4.5 (2022-06-12) | |
222 | ### Added | |
223 | - `serde` support ([#73]) | |
224 | - `U576` type alias ([#94]) | |
225 | ||
226 | [#73]: https://github.com/RustCrypto/crypto-bigint/pull/73 | |
227 | [#94]: https://github.com/RustCrypto/crypto-bigint/pull/94 | |
228 | ||
229 | ## 0.4.4 (2022-06-02) | |
230 | ### Added | |
231 | - `UInt::as_uint_array` ([#91]) | |
232 | ||
233 | [#91]: https://github.com/RustCrypto/crypto-bigint/pull/91 | |
234 | ||
235 | ## 0.4.3 (2022-05-31) | |
236 | ### Added | |
237 | - Impl `AsRef`/`AsMut<[LimbUInt]>` for `UInt` ([#89]) | |
238 | ||
239 | [#89]: https://github.com/RustCrypto/crypto-bigint/pull/89 | |
240 | ||
241 | ## 0.4.2 (2022-05-18) | |
242 | ### Added | |
243 | - `UInt::inv_mod2k` ([#86]) | |
244 | ||
245 | ### Fixed | |
246 | - Wrong results for remainder ([#84]) | |
247 | ||
248 | [#84]: https://github.com/RustCrypto/crypto-bigint/pull/84 | |
249 | [#86]: https://github.com/RustCrypto/crypto-bigint/pull/86 | |
250 | ||
251 | ## 0.4.1 (2022-05-10) | |
252 | ### Fixed | |
253 | - Bug in `from_le_slice` ([#82]) | |
254 | ||
255 | [#82]: https://github.com/RustCrypto/crypto-bigint/pull/82 | |
256 | ||
257 | ## 0.4.0 (2022-05-08) [YANKED] | |
258 | ||
259 | NOTE: this release was yanked due to [#82]. | |
260 | ||
261 | ### Added | |
262 | - Const-friendly `NonZero` from `UInt` ([#56]) | |
263 | - Optional `der` feature ([#61], [#80]) | |
264 | ||
265 | ### Changed | |
266 | - Use `const_panic`; MSRV 1.57 ([#60]) | |
267 | - 2021 edition ([#60]) | |
268 | ||
269 | ### Fixed | |
270 | - Pad limbs with zeros when displaying hexadecimal representation ([#74]) | |
271 | ||
272 | [#56]: https://github.com/RustCrypto/crypto-bigint/pull/56 | |
273 | [#60]: https://github.com/RustCrypto/crypto-bigint/pull/60 | |
274 | [#61]: https://github.com/RustCrypto/crypto-bigint/pull/61 | |
275 | [#74]: https://github.com/RustCrypto/crypto-bigint/pull/74 | |
276 | [#80]: https://github.com/RustCrypto/crypto-bigint/pull/80 | |
277 | ||
278 | ## 0.3.2 (2021-11-17) | |
279 | ### Added | |
280 | - `Output = Self` to all bitwise ops on `Integer` trait ([#53]) | |
281 | ||
282 | [#53]: https://github.com/RustCrypto/crypto-bigint/pull/53 | |
283 | ||
284 | ## 0.3.1 (2021-11-17) | |
285 | ### Added | |
286 | - Bitwise ops to `Integer` trait ([#51]) | |
287 | ||
288 | [#51]: https://github.com/RustCrypto/crypto-bigint/pull/51 | |
289 | ||
290 | ## 0.3.0 (2021-11-14) [YANKED] | |
291 | ### Added | |
292 | - Bitwise `Xor`/`Not` operations ([#27]) | |
293 | - `Zero` trait ([#35]) | |
294 | - `Checked*` traits ([#41]) | |
295 | - `prelude` module ([#45]) | |
296 | - `saturating_*` ops ([#47]) | |
297 | ||
298 | ### Changed | |
299 | - Rust 2021 edition upgrade; MSRV 1.56 ([#33]) | |
300 | - Reverse ordering of `UInt::mul_wide` return tuple ([#34]) | |
301 | - Have `Div` and `Rem` impls always take `NonZero` args ([#39]) | |
302 | - Rename `limb::Inner` to `LimbUInt` ([#40]) | |
303 | - Make `limb` module private ([#40]) | |
304 | - Use `Zero`/`Integer` traits for `is_zero`, `is_odd`, and `is_even` ([#46]) | |
305 | ||
306 | ### Fixed | |
307 | - `random_mod` performance for small moduli ([#36]) | |
308 | - `NonZero` moduli ([#36]) | |
309 | ||
310 | ### Removed | |
311 | - Deprecated `LIMB_BYTES` constant ([#43]) | |
312 | ||
313 | [#27]: https://github.com/RustCrypto/crypto-bigint/pull/27 | |
314 | [#33]: https://github.com/RustCrypto/crypto-bigint/pull/33 | |
315 | [#34]: https://github.com/RustCrypto/crypto-bigint/pull/34 | |
316 | [#35]: https://github.com/RustCrypto/crypto-bigint/pull/35 | |
317 | [#36]: https://github.com/RustCrypto/crypto-bigint/pull/36 | |
318 | [#39]: https://github.com/RustCrypto/crypto-bigint/pull/39 | |
319 | [#40]: https://github.com/RustCrypto/crypto-bigint/pull/40 | |
320 | [#41]: https://github.com/RustCrypto/crypto-bigint/pull/41 | |
321 | [#43]: https://github.com/RustCrypto/crypto-bigint/pull/43 | |
322 | [#45]: https://github.com/RustCrypto/crypto-bigint/pull/45 | |
323 | [#46]: https://github.com/RustCrypto/crypto-bigint/pull/46 | |
324 | [#47]: https://github.com/RustCrypto/crypto-bigint/pull/47 | |
325 | ||
326 | ## 0.2.11 (2021-10-16) | |
327 | ### Added | |
328 | - `AddMod` proptests ([#24]) | |
329 | - Bitwise `And`/`Or` operations ([#25]) | |
330 | ||
331 | [#24]: https://github.com/RustCrypto/crypto-bigint/pull/24 | |
332 | [#25]: https://github.com/RustCrypto/crypto-bigint/pull/25 | |
333 | ||
334 | ## 0.2.10 (2021-09-21) | |
335 | ### Added | |
336 | - `ArrayDecoding` trait ([#12]) | |
337 | - `NonZero` wrapper ([#13], [#16]) | |
338 | - Impl `Div`/`Rem` for `NonZero<UInt>` ([#14]) | |
339 | ||
340 | [#12]: https://github.com/RustCrypto/crypto-bigint/pull/12 | |
341 | [#13]: https://github.com/RustCrypto/crypto-bigint/pull/13 | |
342 | [#14]: https://github.com/RustCrypto/crypto-bigint/pull/14 | |
343 | [#16]: https://github.com/RustCrypto/crypto-bigint/pull/16 | |
344 | ||
345 | ## 0.2.9 (2021-09-16) | |
346 | ### Added | |
347 | - `UInt::sqrt` ([#9]) | |
348 | ||
349 | ### Changed | |
350 | - Make `UInt` division similar to other interfaces ([#8]) | |
351 | ||
352 | [#8]: https://github.com/RustCrypto/crypto-bigint/pull/8 | |
353 | [#9]: https://github.com/RustCrypto/crypto-bigint/pull/9 | |
354 | ||
355 | ## 0.2.8 (2021-09-14) [YANKED] | |
356 | ### Added | |
357 | - Implement constant-time division and modulo operations | |
358 | ||
359 | ### Changed | |
360 | - Moved from RustCrypto/utils to RustCrypto/crypto-bigint repo ([#2]) | |
361 | ||
362 | [#2]: https://github.com/RustCrypto/crypto-bigint/pull/2 | |
363 | ||
364 | ## 0.2.7 (2021-09-12) | |
365 | ### Added | |
366 | - `UInt::shl_vartime` | |
367 | ||
368 | ### Fixed | |
369 | - `add_mod` overflow handling | |
370 | ||
371 | ## 0.2.6 (2021-09-08) | |
372 | ### Added | |
373 | - `Integer` trait | |
374 | - `ShrAssign` impl for `UInt` | |
375 | - Recursive Length Prefix (RLP) encoding support for `UInt` | |
376 | ||
377 | ## 0.2.5 (2021-09-02) | |
378 | ### Fixed | |
379 | - `ConditionallySelectable` impl for `UInt` | |
380 | ||
381 | ## 0.2.4 (2021-08-23) [YANKED] | |
382 | ### Added | |
383 | - Expose `limb` module | |
384 | - `[limb::Inner; LIMBS]` conversions for `UInt` | |
385 | - Bitwise right shift support for `UInt` ([#586], [#590]) | |
386 | ||
387 | ## 0.2.3 (2021-08-16) [YANKED] | |
388 | ### Fixed | |
389 | - `UInt::wrapping_mul` | |
390 | ||
391 | ### Added | |
392 | - Implement the `Hash` trait for `UInt` and `Limb` | |
393 | ||
394 | ## 0.2.2 (2021-06-26) [YANKED] | |
395 | ### Added | |
396 | - `Limb::is_odd` and `UInt::is_odd` | |
397 | - `UInt::new` | |
398 | - `rand` feature | |
399 | ||
400 | ### Changed | |
401 | - Deprecate `LIMB_BYTES` constant | |
402 | - Make `Limb`'s `Inner` value public | |
403 | ||
404 | ## 0.2.1 (2021-06-21) [YANKED] | |
405 | ### Added | |
406 | - `Limb` newtype | |
407 | - Target-specific rustdocs | |
408 | ||
409 | ## 0.2.0 (2021-06-07) [YANKED] | |
410 | ### Added | |
411 | - `ConstantTimeGreater`/`ConstantTimeLess` impls for UInt | |
412 | - `From` conversions between `UInt` and limb arrays | |
413 | - `zeroize` feature | |
414 | - Additional `ArrayEncoding::ByteSize` bounds | |
415 | - `UInt::into_limbs` | |
416 | - `Encoding` trait | |
417 | ||
418 | ### Removed | |
419 | - `NumBits`/`NumBytes` traits; use `Encoding` instead | |
420 | ||
421 | ## 0.1.0 (2021-05-30) | |
422 | - Initial release |