Skip to content

Commit

Permalink
frost_core: add 'static bound to Ciphersuite trait
Browse files Browse the repository at this point in the history
  • Loading branch information
conradoplg committed Jul 5, 2024
1 parent 5fa454d commit d2b553d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions frost-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Entries are listed in reverse chronological order.

## Unreleased

* 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

* Changed the `deserialize()` function of Elements and structs containing
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://www.ietf.org/archive/id/draft-irtf-cfrg-frost-14.html#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

0 comments on commit d2b553d

Please sign in to comment.