Commit Graph

36 Commits

Author SHA1 Message Date
kaczmarczyck
67e3d46291 Cleans up warnings, unused functions and features (#643) 2023-08-14 13:59:54 +02:00
Zach Halvorsen
96af5e81a5 Add more transparency into some EC structures. (#641)
This adds the ability to create ECDH keys from raw bytes and export
signatures as raw bytes.
2023-08-09 17:48:05 +02:00
kaczmarczyck
5f7eb3177b Cryptographic Secret type (#615)
* Adds a type for cryptographic secrets

* default implementations and zeroize documentation

* removes whitespace
2023-04-19 18:02:48 +02:00
kaczmarczyck
a1d6ed0223 Makes our CredRandom derivation FIPS compliant (#613)
* Makes our CredRandom derivation FIPS compliant

This change breaks existing usage of CredRandom.

* fixes rust_crypto and HKDF test style
2023-04-11 14:48:42 +02:00
kaczmarczyck
be42b47caf Replaces Rng256 with new Rng API (#612)
* Replaces the Rng256 with RngCore from rand_core

The old trait was designed with our software crypto in mind. We should
use a more standard API going forward.

- Removes libraries/rng256/
- Ports libraries/crypto/ to rand_core
- Moves the used RNG trait to api/

* Use StdRng directy in TestEnv
2023-04-11 10:23:38 +02:00
kaczmarczyck
c168141b60 Adds a trait for crypto, porting EC first (#606)
* Adds a trait for crypto, porting EC first

* Moves crypto implementation next to its trait

* Renames constants and types
2023-04-04 13:54:41 +02:00
kaczmarczyck
ca65902a8f CTAP library move (#602)
* Moves all CTAP logic into its own library

* workflows fix test

* more coveralls workflow tests
2023-03-07 15:56:46 +01:00
kaczmarczyck
3135c13e6b Moves the TockEnv implementation of RNG to env/ (#599)
This change removes the tock dependencies from non-Tock envs.
2023-03-06 11:21:48 +01:00
kaczmarczyck
6610a29a67 Fixed proc-macro2 version (#550)
* fixes proc-macro2 in dependencies

* adds missing locked versions, and a verbose print for cargo check

* commits Cargo.lock files

* removes unnecessary Cargo.lock entries

* adds missing Cargo.lock
2022-09-27 10:12:45 +02:00
kaczmarczyck
f2fac83124 Fix once_cell dependency (#548)
* fixed version of once_cell

* fixes comments

* removes unnecessary fuzz dependency
2022-09-21 19:32:09 +02:00
kaczmarczyck
1b360662ee Public Key plain byte encoding (#540)
* public key is encoded in bytes

* ECDSA pubkey in uncompressed format
2022-08-31 15:51:40 +02:00
Julien Cretin
a44d961e7e Fix bumpalo issue 2022-08-23 10:43:44 +02:00
Julien Cretin
5685e95b79 Remove useless dependency after rng256 was split out 2022-05-19 15:20:39 +02:00
kaczmarczyck
8979af6ca4 adds Eq to PartialEq (#477) 2022-05-05 15:50:28 +02:00
kaczmarczyck
4782d7e186 Separate RNG library (#470)
* seperates the RNG library

* fixes crypto tests

* adds rng256 workflow

* fixes formatting
2022-04-28 11:36:43 +02:00
Julien Cretin
d47ca7fa54 Add documentation 2022-01-26 11:05:02 +01:00
Julien Cretin
b59df7001f Remove the software-specific Decrypt16BytesBlock and Encrypt16BytesBlock traits
They assume blocks are encrypted/decrypted one at a time. To avoid one syscall
per block, it is preferable to encrypt/decrypt the data at once.

Change-Id: I795c8f5b7901a1b55fa3b06fa45fe57ab19d06ea
2022-01-26 11:05:02 +01:00
kaczmarczyck
98c9191679 HMAC: only 32 byte keys (#424)
* only support HMAC with 32 byte keys

* includes HMAC in the trait to be generic

* re-added HAMC test
2022-01-18 13:14:11 +01:00
Julien Cretin
ce08f82d68 Restrict Sha256 to be used sequentially
Also remove useless HashBlockSize64Bytes bound.
2022-01-17 15:36:51 +01:00
kaczmarczyck
522e6079e3 Forward desktop test fixes (#419)
* fixes clippy warnings for compilers until 2021-11-25

* fixes run_desktop_tests

* removes page_size
2021-11-30 11:07:17 +01:00
kaczmarczyck
b7a3e06cf4 ECDSA signatures and public keys in CTAP (#358)
* ECDSA signatures and public keys in CTAP

* adds one constant usage

* documents pub functions in ECDSA

* typo: involved

* extends wrong length test
2021-08-04 13:39:49 +02:00
David Drysdale
7719078d46 cbor: rename crate to sk-cbor
In anticipation of publishing to crates.io, which already has a `cbor`
crate.
2021-06-16 17:16:05 +02:00
David Drysdale
f2812e4fe2 cbor: drop std feature, use core in tests (#327) 2021-06-16 15:40:18 +02:00
kaczmarczyck
eb0a0770dd adds the PIN protocol trait (#292)
* adds the PIN protocol trait

* improved documentation

* SharedSecret not mutable
2021-03-10 13:20:29 +01:00
kaczmarczyck
5e9c32dff5 HKDF for CTAP2.1 (#290)
* implements hkdf, both regular and FIDO specific

* improved documentation

* constant usage in function return type
2021-03-03 16:33:25 +01:00
Fabian Kaczmarczyck
9270afbc21 remove derive_debug feature 2021-02-02 06:45:04 +01:00
Fabian Kaczmarczyck
371e8b6f35 remove conditional trait implementation 2021-02-02 05:46:03 +01:00
Fabian Kaczmarczyck
2776bd9b8e new CoseKey data format 2021-01-12 15:11:20 +01:00
Fabian Kaczmarczyck
6f9f833c0b moves COSE related conversion from crypto to data_formats 2021-01-08 15:42:35 +01:00
Guillaume Endignoux
5511811703 Fix most Clippy warnings. 2020-09-29 11:05:24 +02:00
Guillaume Endignoux
85a34ad085 Migrate import statements and macros to Rust 2018. 2020-09-24 11:28:24 +02:00
Guillaume Endignoux
b30b88156a Update libraries/ to the new libtock. 2020-08-07 15:09:07 +02:00
Guillaume Endignoux
9c23c36996 Update the ring dev dependency version. 2020-02-06 16:43:32 +01:00
Guillaume Endignoux
b162b690ba Decrease the number of tests in debug mode, to account for slower CI on Travis. 2020-02-06 13:41:18 +01:00
Guillaume Endignoux
a845b813cd Update arrayref version in libraries/crypto. 2020-02-04 11:26:25 +01:00
Jean-Michel Picod
f91d2fd3db Initial commit 2020-01-30 11:47:29 +01:00