Commit Graph

200 Commits

Author SHA1 Message Date
Kevaundray Wedderburn e2e1cd97e3 Add extensible and affine modules to dependency tree 2020-04-14 23:15:48 +01:00
Kevaundray Wedderburn 0df29826f7 Initial implementation of extensible point 2020-04-14 23:15:02 +01:00
Kevaundray Wedderburn 757b8fe41b Add Identity point for ProjectiveNiels 2020-04-14 23:14:35 +01:00
Kevaundray Wedderburn 4ed8d991f3 Add to_projective, add_projective_niels and add_affine_niels 2020-04-14 23:13:47 +01:00
Kevaundray Wedderburn 9cd8354c82 Add Affine and AffineNiels Point 2020-04-14 23:12:54 +01:00
Kevaundray Wedderburn 40101ad144 change visibilty of strong_reduce and invert 2020-04-14 23:12:15 +01:00
Rohit Narurkar cd6390dd93
implement and use karatsuba square function (#13)
Co-authored-by: Rohit Narurkar <rohitnarurkar@gmail.com>
2020-04-14 14:47:34 +01:00
kevaundray c852701116
Merge pull request #12 from roynalnaruto/fn/is_zero
function is_zero using constant-time execution
2020-04-14 13:08:43 +01:00
Rohit Narurkar dddcf81543 function is_zero using constant-time execution 2020-04-14 06:53:23 +05:30
Kevaundray Wedderburn 2a1c65c331 update readme 2020-04-12 21:52:58 +01:00
Kevaundray Wedderburn aad5408a58 - Add mul_double_limb
- Add negate
- Add Sub
2020-04-12 21:52:03 +01:00
Kevaundray Wedderburn ae46f79876 Add Extended Point 2020-04-12 21:45:49 +01:00
Kevaundray Wedderburn 0f1d437f7e Add ProjectivePoint curve representation 2020-04-12 21:44:50 +01:00
Kevaundray Wedderburn 3023e70227 Add wrapping mul for u64 integers in karatsuba to avoid overflow 2020-04-12 21:44:19 +01:00
Kevaundray Wedderburn 38b6d8fe5a remove sub and weak_reduce method from montgomery module 2020-04-12 17:50:35 +01:00
Kevaundray Wedderburn 229ffd2cb1 use constants in montgomery 2020-04-12 17:45:16 +01:00
Kevaundray Wedderburn 5ca2f214ae Add `1-d` and `d` constants 2020-04-12 17:44:59 +01:00
Kevaundray Wedderburn 1f443918d7 update readme 2020-04-12 14:50:22 +01:00
Kevaundray Wedderburn 55d3203f0e Add initial montgomery step algorithm 2020-04-12 14:45:26 +01:00
Kevaundray Wedderburn 58418c94c5 - Add constants file to curve module
- Add curve module to library tree
2020-04-12 14:44:57 +01:00
Kevaundray Wedderburn e399f030f4 [nit] : Initialise and declare variable when it is needed 2020-04-11 11:55:30 +01:00
Kevaundray Wedderburn e61bb07616 Modify test vector for squaring 2020-04-11 11:49:50 +01:00
Kevaundray Wedderburn 8f27f7872e Add Scalar Inversion 2020-04-11 11:42:01 +01:00
Kevaundray Wedderburn 56fab1a9ee move tests for field elements into their own module 2020-03-15 00:24:27 +00:00
Kevaundray Wedderburn 73cacd0eac remove constants import 2020-03-15 00:02:23 +00:00
Kevaundray Wedderburn 932b8f8b7b Add mul test 2020-03-12 23:32:14 +00:00
Kevaundray Wedderburn af6de38091 add mul test for scalar 2020-03-12 23:26:30 +00:00
Kevaundray Wedderburn 1bc06072b3 add equals method to scalar field 2020-03-12 22:55:47 +00:00
Kevaundray Wedderburn 0323947616 Add inverse square root
- Add invert
- Fix bug in deserialisation
- Add wrapping_sub and wrapping_add to necessary functions
2020-03-12 22:40:00 +00:00
Kevaundray Wedderburn 2e93179515 Temporarily replace unrolled karatsuba with rolled karatsuba.
It would be tedious to add wrapping_sub and wrapping_add for each iteration
2020-03-12 22:35:58 +00:00
Kevaundray Wedderburn 2c7496ffd9 remove dbg statements 2020-03-11 21:23:52 +00:00
Kevaundray Wedderburn 0bdeecf4cb remove lingering mod 2020-03-11 21:22:41 +00:00
Kevaundray Wedderburn 4158385e6b - Refactor code to match the removal of Limb28
- Replace Equals method
2020-03-11 21:21:07 +00:00
Kevaundray Wedderburn 6e66c3683c Remove Limb28 abstraction 2020-03-11 21:20:28 +00:00
Kevaundray Wedderburn 9d5af18fce Add Index and IndexMut for Scalars 2020-03-11 19:46:51 +00:00
Kevaundray Wedderburn 6c2b5ce27f Add deny and forbid 2020-03-11 19:17:19 +00:00
Kevaundray Wedderburn a3732a2ab5 Add another test for bias which goes over the HEADROOM 2020-03-11 19:16:41 +00:00
Kevaundray Wedderburn 44cda809cf - Add comments to clarify strong reduce
- Uncomment assert
2020-03-11 19:12:44 +00:00
Kevaundray Wedderburn c07d7a83a3 Add comments to Limb28 file 2020-03-11 19:11:21 +00:00
Kevaundray Wedderburn e6c075626c add basic halving 2020-03-09 00:18:57 +00:00
Kevaundray Wedderburn 4bf6d9c8ee Add minor comments 2020-03-08 01:10:10 +00:00
Kevaundray Wedderburn f0d7266f86 removed constants, adc and sbc method 2020-03-08 00:49:18 +00:00
Kevaundray Wedderburn 3181244054 comment fmt 2020-03-08 00:34:24 +00:00
Kevaundray Wedderburn 3e696ca02e use sbb in sub_extra 2020-03-08 00:34:10 +00:00
Kevaundray Wedderburn cf69898b45 Add adc and sbc const functions,
then reimplement Add with adc
2020-03-08 00:03:08 +00:00
Kevaundray Wedderburn 605f8c5486 add Scalar constants 2020-03-08 00:02:42 +00:00
Kevaundray Wedderburn e613cac56d Add `Mul`, `Sub` and `Add` for Scalar 2020-03-07 09:59:38 +00:00
Kevaundray Wedderburn 12de3e91ce add basic add method 2020-03-05 23:23:42 +00:00
Kevaundray Wedderburn 5b6a2c7773 Update readme 2020-03-04 19:24:46 +00:00
Kevaundray Wedderburn 7ef047007d initial commit 2020-03-04 19:19:46 +00:00