Commit Graph

32 Commits

Author SHA1 Message Date
decentralisedkev 8e9c5fe6aa
typo in Fr.rs 2020-03-07 20:34:59 +00:00
Dimitris Apostolou 5f4374c836
Fix typo 2019-12-07 15:51:54 +02:00
Sean Bowe 2e98dabcb8
Remove the std feature. 2019-12-03 18:31:04 -07:00
Sean Bowe b54b846b50
Make Fq/Fr similar to each other. 2019-12-03 18:17:35 -07:00
Jack Grigg 71ab0bb707
Drop byteorder dependency 2019-11-26 19:41:50 +00:00
Jack Grigg 5a3dea32c5
Allow clippy::suspicious_arithmetic_impl on core::ops impls 2019-11-26 19:37:35 +00:00
Sean Bowe 160cb42398
Change various into_bytes to to_bytes. 2019-05-31 19:47:56 -06:00
ebfull 803b6a3e65
Merge pull request #21 from str4d/stack-tweaks
Stack tweaks
2019-05-30 17:42:07 -06:00
Sean Bowe 8c5adc3708
cargo fmt 2019-05-28 09:59:42 -06:00
Jack Grigg c5bf022613
Remove unnecessary shadowing from Fq::invert and Fr::invert
Shadowing causes Rust to create new stack variables instead of reusing
the stack space. This change saves 160 bytes of stack space in
Fq::invert (a 20% saving in my tests), and 128 bytes of stack space in
Fr::invert.
2019-05-22 11:41:33 +01:00
Jack Grigg 085e8ae675
Replace unnecessary moves of Copy types with immutable references
This significantly reduces the size of the stack.
2019-05-22 11:39:16 +01:00
Jack Grigg cb57a647b5
Use CtOption from subtle crate
Closes #20.
2019-05-04 20:58:19 +01:00
Sean Bowe e72b382055
Fix comment regarding montgomery reduction 2019-03-31 23:15:27 -06:00
Sean Bowe 390aa23db2
Rename Maybe to CtOption, and do not expose submodule. 2019-03-26 21:13:50 -06:00
Sean Bowe 44765a7ad4
Introduce utility functions for AffinePoint and ExtendedPoint. 2019-03-21 15:47:43 -06:00
Sean Bowe 9f0b177fb7
Introduce from_raw for field elements. 2019-03-20 23:44:31 -06:00
Sean Bowe 0cc3d82d98
cargo fmt 2019-03-20 20:30:35 -06:00
Sean Bowe c0e7546f6f
Deny missing Debug implementations and documentation for public facing APIs. 2019-03-20 18:31:33 -06:00
Sean Bowe c70eac71f1
Avoid unnecessary subtraction of modulus during 512-bit reduction. 2019-03-20 18:28:24 -06:00
Sean Bowe 62e20edcf5
Make inversion API return Maybe. 2019-03-20 18:03:35 -06:00
Sean Bowe 71d5b5a1e8
Make Fr sqrt constant time. 2019-03-19 18:06:29 -06:00
Sean Bowe 8752e54904
Make field element deserialization constant time. 2019-03-19 17:57:12 -06:00
Sean Bowe fd32165f1c
Various minor improvements. 2019-02-20 20:44:17 -07:00
Eirik0 b413f8b6c9 cargo fmt 2019-02-20 13:25:49 -07:00
Eirik0 27d6e94677 Add corner case tests for zero 2019-02-20 13:24:50 -07:00
ebfull 1aa0cdf63b
Merge pull request #15 from Eirik0/from-bytes-wide
From bytes wide
2019-02-19 19:52:25 -07:00
Eirik0 2da490cee3 Add from bytes wide for Fr 2019-02-10 23:09:15 -07:00
Eirik0 43e451f103 cargo fmt 2019-02-10 22:47:36 -07:00
Sean Bowe 812ab51091
Updates for Rust 2018 edition. 2019-02-08 19:11:29 -07:00
Eirik Ogilvie-Wigley f3c44112e6 Add test and format 2019-01-09 15:50:16 -07:00
Eirik Ogilvie-Wigley abc25f7677 Simplify square root function for Fr 2019-01-09 15:25:36 -07:00
Eirik Ogilvie-Wigley 774be1dea6 Add scalar field Fr 2019-01-09 15:25:36 -07:00