-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Manuel Santos <[email protected]>
- Loading branch information
Showing
14 changed files
with
411 additions
and
78 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,4 @@ | ||
# Signing protocol | ||
|
||
- This protocol is the main singing protocol of the FROST EdDSA Signing protocol from the [givre](https://docs.rs/givre/latest/givre/index.html) library. | ||
- It generates a signature that is sent to the client. |
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,12 @@ | ||
//! Threshold EdDSA protocol | ||
pub mod output; | ||
pub mod state; | ||
|
||
pub use state::*; | ||
#[cfg(test)] | ||
pub mod test; | ||
|
||
use state_machine::StateMachine; | ||
|
||
/// The Eddsa Signing state machine. | ||
pub type EddsaSignStateMachine = StateMachine<EddsaSignState>; |
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,28 @@ | ||
//! Outputs for the EdDSA signing protocol. | ||
use givre::signing::round2::SigningError; | ||
use std::fmt::Display; | ||
use threshold_keypair::signature::EddsaSignature; | ||
|
||
/// The EdDSA signing output. | ||
pub enum EddsaSignatureOutput { | ||
/// The protocol was successful. | ||
Success { | ||
/// The output elements. | ||
element: EddsaSignature, | ||
}, | ||
|
||
/// This or a subprotocol aborted by chance. | ||
Abort { | ||
/// The reason why it aborted | ||
reason: SigningError, | ||
}, | ||
} | ||
|
||
impl Display for EddsaSignatureOutput { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
match self { | ||
Self::Success { .. } => write!(f, "Success"), | ||
Self::Abort { .. } => write!(f, "Abort"), | ||
} | ||
} | ||
} |
Oops, something went wrong.