Commit Graph

160 Commits

Author SHA1 Message Date
f15ae3e323 A very naive version of AES encryption. 2019-07-07 17:30:03 -07:00
c32fa6c2b6 Portable AES256 expansion. 2019-07-06 21:43:50 -07:00
c07fccd57c A portable version of AES128 key expansion. 2019-07-06 21:27:18 -07:00
08be0bf9e4 Add AES256 support to the aes-ni section. 2019-06-30 21:18:55 -07:00
ecc29f06fa AES-128 support, using the AES-NI extensions. 2019-06-30 15:24:29 -07:00
82bb499be3 Switch to using the internal SHA/HMAC implementations. 2019-06-08 17:43:30 -07:00
20c65b93bf Add support for HMAC computation, although in an awkward module. 2019-06-08 16:30:21 -07:00
7c45f898ab Add support for SHAKE128 and SHAKE256. 2019-06-08 14:56:59 -07:00
c675aaa5f6 Add a bunch of documentation and examples. 2019-06-08 11:39:47 -07:00
6d4c9c4f50 Implement SHA3! 2019-06-07 23:01:25 -07:00
a34d8dc88b SHA2 support! 2019-06-05 08:38:12 -07:00
b59653de57 Initial support for SHA1. 2019-06-03 21:10:47 -07:00
3eee154fe1 Address multi-platform newline support. 2019-05-31 08:38:19 -07:00
0b4d84b038 Update some of the technical debt. 2019-05-28 22:01:37 -07:00
54687cb602 Add some helpful documentation for the SSH library. 2019-05-28 21:58:47 -07:00
1bac2010b1 Add example code for RSA. 2019-05-28 21:46:04 -07:00
818b006521 Add an example for ED25519 keys. 2019-05-28 21:35:33 -07:00
bae1c93c54 Add examples for the ECDSA code. 2019-05-28 21:30:04 -07:00
ef3174f224 Fix an overflow in DSA key generation. 2019-05-28 21:02:55 -07:00
89c8705779 [BROKEN] Start the process of adding examples to the top of the files, and in doing so note that DSA key generation is broken. 2019-05-27 21:42:40 -07:00
080c8f18e2 Update some top-level documentation. 2019-05-27 20:48:56 -07:00
060b82b351 Update the x.509 documentation ... which made a number of flaws very obvious. 2019-05-27 20:46:34 -07:00
ba2ceee725 Update the SSH documentation. 2019-05-27 20:28:34 -07:00
4d2e43620a Add documentation for the RSA tree. 2019-05-27 20:13:04 -07:00
c5850b4d01 ECDSA documentation. 2019-05-26 21:10:35 -07:00
a19c1ee124 Some more ECDSA documentation. 2019-05-26 20:48:04 -07:00
2145fb47fa Remove the DSA key generation trait, just make direct methods. 2019-05-26 17:02:27 -07:00
2912c72a07 Add a bunch of DSA documentation. 2019-05-26 16:59:43 -07:00
23a79300c8 Cache the public point in ED25519Public. 2019-05-26 16:26:40 -07:00
0e6664f232 Split out files for loading and scalars, clean up mod imports. 2019-05-26 16:15:24 -07:00
4ce8797da2 Push last bit of Point functionality into impls. (I hope.) 2019-05-26 16:06:37 -07:00
7f2b509640 Switch to Add/Sub impls. 2019-05-26 15:59:04 -07:00
b0885722a8 Convert into double() methods. 2019-05-26 15:32:30 -07:00
83cdd8ef4c Use From methods, rather than function converters. 2019-05-26 15:21:59 -07:00
2f395721bc [CHECKPOINT] Tidy, tidy, tidy. 2019-05-26 15:03:42 -07:00
2b63dfa376 Shift sq2/pow22523. Everything should be properly in FieldElement now. 2019-05-26 14:27:52 -07:00
fc09ff48a2 Shift over fe_cmov/fe_isnonzero/fe_isnegative. 2019-05-26 14:20:16 -07:00
c9f418feff Convert negation and inverstion into more reasonable operations. 2019-05-26 09:51:17 -07:00
ac380d08af Move fe_square() into square() and square_mut() in FieldElement. 2019-05-25 16:59:56 -07:00
25746af626 Shift fe_mul to normal Rust multiplication operations. 2019-05-25 16:37:04 -07:00
16cf6172ce Support reading and writing ED25519 SSH keys. 2019-05-22 19:57:20 -07:00
d2bdbd37fe Shift to +/- from fe_add/fe_sub. 2019-05-22 19:56:10 -07:00
e6e3789127 Pull to_bytes() into FieldElement. 2019-05-21 19:45:08 -07:00
8bca480e47 Move fe_frombytes into FieldElement. 2019-05-20 21:17:53 -07:00
b42902e6ab Shift from_bytes into the Point impl.
Looks like we were also computing our test cases in a slightly sketchy
way, and just testing that we failed in exactly the same way. We do, but
now we generate better test data.
2019-05-18 17:38:55 -07:00
44618c2e2f type Element --> struct FieldElement 2019-05-16 17:27:29 -07:00
4c03ab6648 Move the encoding code into the point module. 2019-05-16 10:44:57 -07:00
1b2d7db1e0 Remove rust-crypto dependency (only used during debugging), and split KeyPair into Private/Public parts. 2019-05-15 21:38:25 -07:00
9cf0b587b2 Checkpoint: Signing seems to work, but there's a lot of cruft and cross-checks. 2019-05-15 18:11:23 -07:00
d459850c54 This is a very naive Rust tanslation of the basic math behind the ed25519 crypto scheme.
In general, it's a straight translation of the Google code, which in
turn is "mostly taken from the ref10 version of Ed25519 in SUPERCOP
10241124.", except that it's been hand translated to rust with some
test case generators. Future versions should clean this up to be more
normally rust-y.
2019-05-14 21:54:59 -07:00