This website requires JavaScript.
a390a7bb53
Start moving from from_bytes to from in the curve constants.
Adam Wick
2019-02-04 19:28:17 -08:00
71cb38ca30
Comment out some very slow test cases. Probably need a better way to do this.
Adam Wick
2019-02-04 19:27:58 -08:00
322701ad6c
ECC Private key support.
Adam Wick
2019-02-04 19:27:23 -08:00
8a771c05a4
Tweak some build flags.
Adam Wick
2019-02-04 19:27:01 -08:00
a8174ac47e
Fix a typo in the P521 base point.
Adam Wick
2019-02-04 19:26:35 -08:00
00b944e30a
Remove From<U512> requirement on the k-generator.
Adam Wick
2019-02-04 19:25:57 -08:00
63bfda9073
Remove extraneous file.
Adam Wick
2019-02-04 19:25:28 -08:00
4529562cb8
This appears to work ... maybe. slowly.
Adam Wick
2019-01-27 19:02:52 -08:00
4af5446e80
Start work on ECDSA signing.
Adam Wick
2019-01-18 21:55:52 -08:00
04b4c79f7a
Add size querying for ECDSA curves.
Adam Wick
2019-01-18 21:55:42 -08:00
89deea0337
Cleanups for the RFC 6979 code, plus support for running the test cases.
Adam Wick
2019-01-18 21:55:08 -08:00
f60a492a0b
Updated cabal file and generated test cases.
Adam Wick
2019-01-18 21:54:18 -08:00
c5e9d4be25
Add test generation for RFC 6979 k value generation.
Adam Wick
2019-01-18 21:53:52 -08:00
f4e47154c2
Add ECDSA scaling and signing tests.
Adam Wick
2019-01-18 21:53:15 -08:00
cdcfd9a3a3
Basic point math, with tests. Distressingly slow.
Adam Wick
2019-01-08 09:45:02 -08:00
f3494d8524
Handle negative scaling factors.
Adam Wick
2018-12-30 21:16:16 -08:00
eb82edea7e
Start with Elliptic Curve point math. Slow, but it works.
Adam Wick
2018-12-30 21:00:10 -08:00
62cb276888
DSA support!
Adam Wick
2018-12-08 10:59:14 -06:00
160618cdd7
Update some libraries, and now RSA works again!
Adam Wick
2018-11-21 22:27:59 -08:00
9d87916cc5
Rewrite against a newer cryptonum.
Adam Wick
2018-11-14 20:51:14 -05:00
ef54ed4cda
Remove the cryptonum stuff; it's been moved to a different crate.
Adam Wick
2018-10-27 15:15:23 -07:00
43b73139cd
Checkpoint; not sure where this code is, but I'm rethinking.
Adam Wick
2018-10-27 15:10:19 -07:00
b30fe6a75f
Modular exponentiation with Barrett reduction. Seems slow. :(
Adam Wick
2018-06-18 12:04:11 -07:00
011ebc0c99
Extend modular addition to Barrett constants.
Adam Wick
2018-06-18 08:42:01 -07:00
a6def22bd1
Barrett reduction!
Adam Wick
2018-06-17 11:01:22 -07:00
c49cd29c43
Barrett reduction
Adam Wick
2018-06-10 21:09:53 -07:00
65d7b7e93f
Modular exponentiation!
Adam Wick
2018-06-10 21:09:35 -07:00
b93286fe60
Make modular addition take a trait argument like the others.
Adam Wick
2018-06-10 10:36:49 -07:00
5a5b48569b
Switch to the same test naming scheme across modules.
Adam Wick
2018-06-10 10:36:34 -07:00
b5afa8fdf9
Modular squaring support (slow, initially)
Adam Wick
2018-06-09 17:32:46 -07:00
26eb05ceeb
Don't use Vecs in modmul, use fixed-size buffers
Adam Wick
2018-06-09 17:32:15 -07:00
fee68cca18
Create a modular multiplication trait, and build a slow implementation using mod.
Adam Wick
2018-06-09 17:12:01 -07:00
11c951d29b
Fix division; we were computing n wrong.
Adam Wick
2018-06-09 17:08:13 -07:00
72a5c4568e
Division! (With tests)
Adam Wick
2018-06-04 21:36:03 -07:00
eae2ea49a9
My multiplication loops were not, in fact, off by one.
Adam Wick
2018-06-04 21:35:13 -07:00
69596c83ec
Remove a debugging println!() that I missed in a previous commit.
Adam Wick
2018-06-04 21:34:09 -07:00
bebb5b2861
Support for fast squaring.
Adam Wick
2018-06-02 20:29:44 -07:00
a5f0179d77
Publish a decoder, to make testing a bit easier.
Adam Wick
2018-06-02 20:28:53 -07:00
041f824caf
Give credit where credit is due.
Adam Wick
2018-06-02 20:28:33 -07:00
f088f0f9a5
A second crack at fixed-sized numbers.
Adam Wick
2018-06-02 09:26:34 -07:00
bdf7f81b20
[BROKEN] Trying to get elliptic curve working, which is much too slow at the moment.
variable_cryptonum
Adam Wick
2018-05-31 18:37:18 +01:00
dde1092f49
Start building out ECC infrastructure.
Adam Wick
2018-05-21 18:38:56 +01:00
6fabbe6af1
Initial port-over of ECDSA signing.
Adam Wick
2018-05-16 22:00:17 -07:00
f83b8a3fe5
Ignore more things.
Adam Wick
2018-05-15 15:42:51 -07:00
61f4a009a0
Update the Travis build to use stable, and to leave some time for the tests to run.
Adam Wick
2018-05-15 14:45:39 -07:00
1d67b4c775
Split the encryption test suite into two parts, to help reduce the cost of the test suite.
Adam Wick
2018-05-15 07:28:00 -07:00
81ccf3e06b
Trying to cut down the time taken running the test suite, so that we fit in Travis's expectations.
Adam Wick
2018-05-12 16:41:55 -07:00
219641da5e
Try to speed up DSA a bit using Barrett reduction.
Adam Wick
2018-05-12 16:41:33 -07:00
f0f4891abe
DSA! Working, with tests!
Adam Wick
2018-05-12 08:04:33 -07:00
3d767c3e13
Switch to a Java-based test generator, which seems to work better.
Adam Wick
2018-05-06 21:22:10 -07:00
a2b4baa087
Initial DSA support.
Adam Wick
2018-05-05 21:06:11 -07:00
213c75ad51
Add some #[ignore]s for the longer-running tests.
Adam Wick
2018-05-05 19:47:59 -07:00
29a14b39e6
Fix the bits() implementation, and add is_multiple_of() and gcd().
Adam Wick
2018-05-05 19:42:21 -07:00
c34629aa47
Add conversions for BigInt/BigUint.
Adam Wick
2018-05-05 19:41:30 -07:00
b01c59a094
I've started playing with IDEs, let's ignore their leavings.
Adam Wick
2018-05-05 19:38:48 -07:00
fa04efa5fe
Encryption! With test cases.
Adam Wick
2018-05-02 17:05:17 -07:00
bd0ddd848b
A very slightly faster modexp.
Adam Wick
2018-05-01 23:04:06 -07:00
9c60a3bc3e
Ignore the Haskell executable I generated.
Adam Wick
2018-05-01 22:31:04 -07:00
7c28727f73
RSA signature verification.
Adam Wick
2018-05-01 22:30:07 -07:00
c9092ffe6a
Slightly better test generation for RSA signatures.
Adam Wick
2018-05-01 22:29:37 -07:00
296bb6ad90
Remove an unnecessary mut.
Adam Wick
2018-05-01 22:28:59 -07:00
d9df506920
Start with RSA signing! Looks like it works against Haskell RSA test vectors.
Adam Wick
2018-04-30 13:05:57 -07:00
2eacea8ff9
Factor out the testing code, so we can use it later.
Adam Wick
2018-04-30 13:05:10 -07:00
153d88237f
Clean up (and make a lot more flexible) the code to translate to/from bytes.
Adam Wick
2018-04-30 13:04:46 -07:00
5758b6e22b
Factor out the gold testing infrastructure so we can use it elsewhere.
Adam Wick
2018-04-23 20:31:02 -07:00
baa70a6ce6
Starting to include RSA crypto.
Adam Wick
2018-04-14 10:45:11 -07:00
b5a5cbdd98
Serialization routines.
Adam Wick
2018-04-14 07:56:03 -07:00
4985426e74
Prospective prime support.
Adam Wick
2018-04-14 07:16:50 -07:00
c45235473a
Support modular inverses.
Adam Wick
2018-04-14 07:05:57 -07:00
b1c659087d
Add a quick test to ensure that our GCD algorithm works.
Adam Wick
2018-04-14 07:01:59 -07:00
0d08f53d70
Make sure we print 0.
Adam Wick
2018-04-14 06:59:49 -07:00
109e23789a
Support fast modular exponentiation for when your base is roughly the same order of magnitude as the modulo.
Adam Wick
2018-04-13 11:51:39 -04:00
551ebeac3b
Fix some println!() leavings.
Adam Wick
2018-04-13 10:57:43 -04:00
017392ff6c
Fix the conversion functions, make sure we can do usize, too.
Adam Wick
2018-04-13 10:57:22 -04:00
d98baa1381
Fix Barrett reduction.
Adam Wick
2018-04-13 10:56:59 -04:00
330dabe017
Shift the gold testing infrastructure into its own module, and add the Haskell program I used to generate the tests.
Adam Wick
2018-04-13 10:56:13 -04:00
675f8adc7e
[BROKEN] Division seems to be broken? Might need better test vectors.
Adam Wick
2018-04-05 18:02:03 -07:00
5868553c74
First whack at prime numbers and such.
Adam Wick
2018-04-04 17:27:07 -07:00
ceb1e9eb58
Fix some shifting issues.
Adam Wick
2018-04-04 17:26:49 -07:00
3cd37a881d
First whack at modular inverses.
Adam Wick
2018-04-04 18:47:02 -04:00
2f16a45784
Quickcheck properties for signed numbers.
Adam Wick
2018-04-04 18:28:01 -04:00
f06f83583f
Whoops. Don't correct for rounding if there's no remainder on the division.
Adam Wick
2018-04-04 18:13:50 -04:00
ae6a33f4b8
Support negation for signed numbers.
Adam Wick
2018-04-04 18:12:30 -04:00
8a4693d30d
Zero is a problem for me.
Adam Wick
2018-04-04 17:49:50 -04:00
20592a3d65
I guess i128_type isn't stable in the beta after all.
Adam Wick
2018-04-03 07:04:38 -04:00
acda294bac
Signed numbers!
Adam Wick
2018-04-02 16:36:28 -04:00
c4409d9c25
Fix some printlns and other bad bits.
Adam Wick
2018-04-02 15:26:41 -04:00
ec0f0dc597
Add support for gold value testing, as well, and test some stuff.
Adam Wick
2018-04-02 15:26:16 -04:00
80f57b9f22
Fix division by not returning a weirdly-shifted remainder when the quotient is zero.
Adam Wick
2018-04-02 15:24:48 -04:00
fa33de88db
Fix subtraction.
Adam Wick
2018-04-02 15:23:38 -04:00
b92b47d971
[BROKEN] First crach at division.
Adam Wick
2018-04-01 20:43:19 -07:00
a4e65fa35f
Fix multiplication when either argument is zero.
Adam Wick
2018-04-01 20:42:49 -07:00
30bff2a22f
Multiplication.
Adam Wick
2018-03-31 21:25:10 -07:00
185881df91
Addition and subtraction.
Adam Wick
2018-03-31 18:03:17 -07:00
824718eafc
Also now enable beta builds in the Travis file.
Adam Wick
2018-03-29 21:45:14 -07:00
bfdede4241
Remove the i128 feature, as it's now good in nightlies.
Adam Wick
2018-03-29 21:26:15 -07:00
d6c59b5037
Fix shifts!
Adam Wick
2018-03-29 21:25:39 -07:00
fd9254a322
[BROKEN] Broken definitions of the shift operators.
Adam Wick
2018-03-27 17:02:54 -07:00
f9b25ab03a
Add lowercase hex formatting.
Adam Wick
2018-03-25 20:18:13 -07:00
d53cdb6c97
And, or, and xor.
Adam Wick
2018-03-25 20:14:25 -07:00