-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into franziskus/update-c-ext-tools
- Loading branch information
Showing
28 changed files
with
9,248 additions
and
454 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,8 @@ members = [ | |
"poly1305", | ||
"chacha20poly1305", | ||
"rsa", | ||
"ecdsa", | ||
"p256", | ||
"blake2", | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[package] | ||
name = "libcrux-ecdsa" | ||
description = "Formally verified ECDSA signature library" | ||
|
||
version.workspace = true | ||
authors.workspace = true | ||
license.workspace = true | ||
homepage.workspace = true | ||
edition.workspace = true | ||
repository.workspace = true | ||
readme.workspace = true | ||
|
||
[dependencies] | ||
libcrux-p256 = { version = "=0.0.2-beta.2", path = "../p256", features = [ | ||
"expose-hacl", | ||
] } | ||
libcrux-sha2 = { version = "=0.0.2-beta.2", path = "../sha2" } | ||
rand = { version = "0.8", optional = true } | ||
|
||
[features] | ||
default = ["rand"] | ||
rand = ["dep:rand"] | ||
|
||
[dev-dependencies] | ||
serde = { version = "1.0.217", features = ["derive"] } | ||
serde_json = "1.0.138" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//! # ECDSA | ||
//! | ||
//! A formally verified implementation of ECDSA on P-curves. | ||
//! | ||
//! For now only P-256 is supported. | ||
#![no_std] | ||
#![forbid(unsafe_code)] | ||
|
||
pub mod p256; | ||
|
||
#[derive(Debug, PartialEq, Eq, Clone, Copy)] | ||
pub enum Error { | ||
InvalidInput, | ||
InvalidScalar, | ||
InvalidPoint, | ||
NoCompressedPoint, | ||
NoUnCompressedPoint, | ||
SigningError, | ||
InvalidSignature, | ||
RandError, | ||
UnsupportedHash, | ||
} | ||
|
||
/// The hash algorithm used for signing or verifying. | ||
pub type DigestAlgorithm = libcrux_sha2::Algorithm; | ||
|
||
/// The number of iteration for rejection sampling. | ||
pub(crate) const RAND_LIMIT: usize = 100; |
Oops, something went wrong.