11 Commits

Author SHA1 Message Date
Brian Smith
f0d4d21e85 Use stable rustfmt. 2019-04-10 09:33:38 -10:00
Brian Smith
615a8f97e3 Allow Aad to own its contents.
This reverts commit 38a2237a74edf710c4de5f28004ce7e89ba9f10b,
which reverted the previous attempt to do this.
2019-03-19 17:04:38 -10:00
Brian Smith
18668c681d Use Self more. 2019-03-06 15:23:18 -10:00
Brian Smith
5dc4dda179 Use libc's types instead of defining our own ring::c.
As far as I know, `libc` is available for every target now. Especially
since the introduction of `bssl::Result` we hardly reference these
types, other than `size_t`. This will help get rid of crypto/crypto.c.
2019-02-05 19:41:48 -10:00
Brian Smith
3dfbe3bf6b Do GCM CPU feature detection in Rust.
Rename some GCM assembly functions so that all functions that do the
same thing the same way have the same name, to make the dispatching
logic simpler.

Thread CPU feature caching witnesses through the GCM dispatching logic
to make feature detection less error-prone.

Start an internal Rust API for feature detection.
2019-01-28 14:33:31 -10:00
Brian Smith
38a2237a74 Revert "Allow Aad to own its contents."
This reverts commit c1c9c2221ef26c7cb808ffe79dad4217bd7f431b.

I am looking at improving the API in a different way, so I'm undoing
this change to reduce churn in the interim.
2019-01-25 09:57:26 -10:00
Brian Smith
c1c9c2221e Allow Aad to own its contents.
This allows `Aad` to be returned by value from functions, which is useful in
many cases.
2019-01-23 08:18:28 -10:00
Brian Smith
5f670008e3 Push use of Aad type down to the aead::gcm. 2019-01-22 17:19:39 -10:00
Brian Smith
7bad631ec0 Define GCM128_KEY the same way in both Rust and C. 2019-01-22 17:12:14 -10:00
Brian Smith
36039cf0b6 Fix x86-64 integrated AES-GCM feature detection.
The integrated code path requires CLMUL too.
2019-01-18 12:50:06 -10:00
Brian Smith
b989d3343d Implement high-level AES-GCM logic to Rust. 2018-12-14 11:39:34 -10:00