Skip to content

Commit

Permalink
frost-core: split part of lib.rs into traits.rs and serialization.rs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
conradoplg authored Nov 7, 2023
1 parent a0df08e commit 408540f
Show file tree
Hide file tree
Showing 11 changed files with 468 additions and 435 deletions.
2 changes: 2 additions & 0 deletions frost-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Entries are listed in reverse chronological order.
* The `frost-core::frost` module contents were merged into `frost-core`, thus
eliminating the `frost` module. You can adapt any calling code with e.g.
changing `use frost_core::frost::*` to `use frost-core::*`.
* `Challenge`, `BindingFactor`, `BindingFactorList` and `GroupCommitment`
are no longer public (you can use them with the `internals` feature).
* Both serde serialization and the default byte-oriented serialization now
include a version field (a u8) at the beginning which is always 0 for now. The
ciphersuite ID field was moved from the last field to the second field, after
Expand Down
2 changes: 1 addition & 1 deletion frost-core/src/identifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{
use crate::{Ciphersuite, Error, Field, FieldError, Group, Scalar};

#[cfg(feature = "serde")]
use crate::ScalarSerialization;
use crate::serialization::ScalarSerialization;

/// A FROST participant identifier.
///
Expand Down
7 changes: 4 additions & 3 deletions frost-core/src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ use rand_core::{CryptoRng, RngCore};
use zeroize::{DefaultIsZeroes, Zeroize};

use crate::{
Ciphersuite, Deserialize, Element, Error, Field, Group, Header, Identifier, Scalar, Serialize,
SigningKey, VerifyingKey,
serialization::{Deserialize, Serialize},
Ciphersuite, Element, Error, Field, Group, Header, Identifier, Scalar, SigningKey,
VerifyingKey,
};

#[cfg(feature = "serde")]
use crate::{ElementSerialization, ScalarSerialization};
use crate::serialization::{ElementSerialization, ScalarSerialization};

use super::compute_lagrange_coefficient;

Expand Down
4 changes: 2 additions & 2 deletions frost-core/src/keys/dkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub mod round1 {
use derive_getters::Getters;
use zeroize::Zeroize;

use crate::{Deserialize, Serialize};
use crate::serialization::{Deserialize, Serialize};

use super::*;

Expand Down Expand Up @@ -167,7 +167,7 @@ pub mod round2 {
use derive_getters::Getters;
use zeroize::Zeroize;

use crate::{Deserialize, Serialize};
use crate::serialization::{Deserialize, Serialize};

use super::*;

Expand Down
Loading

0 comments on commit 408540f

Please sign in to comment.