Commit Graph

65 Commits

Author SHA1 Message Date
430401ba54 Fix right shift. 2019-11-23 20:59:21 -08:00
8c4b369911 Fix left shift. 2019-11-23 20:36:21 -08:00
ba587cb37f Start trying to generate shift code. 2019-11-04 17:08:16 -08:00
ed07a0855d Tests, that work! 2019-10-31 18:56:10 -04:00
c52dadcf22 Some commits in the way of cleaning up the Rust and generating module lists. 2019-10-31 16:39:00 -04:00
3b0bd25dfa Clean out the old testdata work. 2019-10-31 16:36:19 -04:00
0dec5815dc Fix a bunch of build errors. 2019-10-24 08:46:42 -07:00
620048bce6 Complete the shift over to language-rust. 2019-10-22 22:06:34 -07:00
2400b10fbc Start working on switching to language-rust as a generator, for fun. 2019-10-22 20:12:08 -07:00
d7665acf64 Add a bunch of QuickCheck properties for binary operators. 2019-07-30 18:24:49 -07:00
1d8907539d Get back to basics, with some basic tests working. 2019-07-30 16:23:14 -07:00
203c23e277 Add from_bytes() and to_bytes() to CryptoNum, and do a basic implementation of from_bytes(). 2019-07-23 21:05:20 -07:00
aff88eb2f0 Support a more complete (and simple) requirements gathering mechanism,
and add support for binary operations.

This version of requirements generation simply generates every numeric
size within a provided range, and then will reject trait implementations
that rely on values outside this range. It should be a little more easy
to reason about, and easier to make local changes as I (inevitably) need
to modify rules.
2019-07-22 08:14:40 -07:00
ab465296f2 The basic binary operations. 2019-07-15 21:00:12 -07:00
fa872c951a Start experimenting with full generation of all of the numeric types.
Previously, we used a little bit of generation to drive a lot of Rust
macros. This works, but it's a little confusing to read and write. In
addition, we used a lot of implementations with variable timings based
on their input, which isn't great for crypto. This is the start of an
attempt to just generate all of the relevant Rust code directly, and to
use timing-channel resistant implementations for most of the routines.
2019-07-15 17:39:06 -07:00
666378b14b Add support for bitwise and and or on unsigned numbers. 2019-05-27 21:41:05 -07:00
83ed5bc0ba Remove an unnecessary #[macro_use] 2019-05-14 21:49:24 -07:00
cac39b0e50 Always generate Arbitrary instances, not just with cfg(test) 2019-04-03 19:47:07 -07:00
037413ad15 Start tracking the TODO list. 2019-02-11 16:36:11 -05:00
fbee1f2729 Add modular multiplication suppor for U384 and U576. 2019-02-11 12:34:59 -08:00
2d70341a58 Remove a cabal config file that seems to have been accidentally captured. 2019-02-10 17:43:05 -08:00
d49c85538c Remove a bunch of test data we don't appear to be using. 2019-02-10 17:41:41 -08:00
10b70139f2 Some additional helpers for ECDSA signing. 2019-02-04 17:23:45 -08:00
2d863c1907 Add support for directly defining unsigned values. 2019-02-04 17:23:27 -08:00
d189331312 Try to simplify the multiplication loop, to get better optimization, and add a bunch of missing test cases. 2019-01-30 20:34:38 -08:00
56fb154c90 Fix the QuickCheck logic for back conversion. 2019-01-08 09:48:28 -08:00
3b0e2a84d9 Support for squaring of signed numbers. 2019-01-08 09:48:11 -08:00
c5fa23c4bd Fix the requirements for ECDSA math. 2019-01-08 09:47:47 -08:00
4114db21be Add support for scaling numbers by primitive types. 2019-01-01 20:55:21 -08:00
69312c6a42 Update moddiv to use the new signed operators. 2019-01-01 20:48:48 -08:00
6268491168 Extra little conversion check. 2019-01-01 20:47:40 -08:00
a4ead1ec3d Add additional test files. 2018-12-30 17:54:08 -08:00
7da10f5fa4 Clean up requirements. 2018-12-30 17:51:22 -08:00
dc6732a875 Don't ignore assertions in the test files. (Whoops) 2018-12-30 17:15:18 -08:00
c55a1956d4 Add support for modular division with negative divisors. 2018-12-30 17:14:52 -08:00
130a87ef43 Add support for signed modular inversion. 2018-12-30 17:14:11 -08:00
a6a82773d3 Add additional support for GCD on signed numbers. 2018-12-30 17:13:01 -08:00
14fd156d3c Add the obvious conversion from u64 to signed values. 2018-12-30 17:09:48 -08:00
ae8266885b Support modular division of signed numbers. 2018-12-23 21:55:07 -08:00
2480bafe06 Remove some lingering debugging prints. 2018-12-23 21:45:51 -08:00
70a082363a Add a testbit() operationg. 2018-12-23 21:05:27 -08:00
85165c7f68 Address some missing operations for ECDSA. 2018-12-23 21:05:05 -08:00
6c40ee5109 Support signed multiplication and division, for ECDSA. 2018-12-23 20:24:20 -08:00
b52dd4d355 Support in-place division, multiplication, and modulos. 2018-12-23 20:23:36 -08:00
364b0d168b Update against deprecated API. 2018-12-23 20:22:27 -08:00
2b9f5ea7a2 Support unsigned integral square root computations. 2018-11-30 11:28:20 -08:00
0ec5f90d8e Ridiculously over-build the testing infrastructure. 2018-11-29 17:06:34 -08:00
60d7dd3af5 Add support for random numbers, and prime generation and testing. 2018-11-29 17:03:33 -08:00
62e36d79cb Add a bit length function that's handy for macros. 2018-11-14 21:33:58 -05:00
1a2f3aaa7a Open up the Barrett number construction / debugging a bit. 2018-11-06 21:54:32 -08:00