Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frost_core: add 'static bound to Ciphersuite trait #701

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions frost-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Entries are listed in reverse chronological order.

* Added refresh share functionality for trusted dealer:
`frost_core::keys::refresh::{compute_refreshing_shares, refresh_share}`
* Added a `'static` bound to the `Ciphersuite` trait. This is a breaking change,
but it's likely to not require any code changes since most ciphersuite
implementations are probably just empty structs. The bound makes it possible
to use `frost_core::Error<C>` in `Box<dyn std::error::Error>`.

## 2.0.0-rc.0

Expand Down
3 changes: 2 additions & 1 deletion frost-core/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ pub type Element<C> = <<C as Ciphersuite>::Group as Group>::Element;
/// function.
///
/// [FROST ciphersuite]: https://datatracker.ietf.org/doc/html/rfc9591#name-ciphersuites
pub trait Ciphersuite: Copy + Clone + PartialEq + Debug {
// See https://github.com/ZcashFoundation/frost/issues/693 for reasoning about the 'static bound.
pub trait Ciphersuite: Copy + Clone + PartialEq + Debug + 'static {
/// The ciphersuite ID string. It should be equal to the contextString in
/// the spec. For new ciphersuites, this should be a string that identifies
/// the ciphersuite; it's recommended to use a similar format to the
Expand Down
Loading