Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
Unify wording of serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Sep 25, 2023
1 parent 123cf71 commit f34f223
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/dkg/key_generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2330,16 +2330,16 @@ mod test {
p3_their_encrypted_secret_shares[2].clone(),
];

// Check serialisation
// Check serialization

let bytes = p1.to_bytes()?;
assert_eq!(p1, Participant::from_bytes(&bytes)?);

let bytes = p1coeffs.to_bytes()?;
let p1coeffs_deserialised = Coefficients::from_bytes(&bytes)?;
assert_eq!(p1coeffs.0.len(), p1coeffs_deserialised.0.len());
let p1coeffs_deserialized = Coefficients::from_bytes(&bytes)?;
assert_eq!(p1coeffs.0.len(), p1coeffs_deserialized.0.len());
for i in 0..p1coeffs.0.len() {
assert_eq!(p1coeffs.0[i], p1coeffs_deserialised.0[i]);
assert_eq!(p1coeffs.0[i], p1coeffs_deserialized.0[i]);
}

let bytes = p1_dh_sk.to_bytes()?;
Expand Down Expand Up @@ -2383,7 +2383,7 @@ mod test {
assert!(p1_group_key.key == p2_group_key.key);
assert!(p2_group_key.key == p3_group_key.key);

// Check serialisation
// Check serialization
let bytes = p1_group_key.to_bytes()?;
assert_eq!(p1_group_key, GroupVerifyingKey::from_bytes(&bytes)?);

Expand Down Expand Up @@ -2433,7 +2433,7 @@ mod test {

assert!(p1_group_key == p3_group_key);

// Check serialisation
// Check serialization

let bytes = complaints[0].proof.to_bytes()?;
assert_eq!(complaints[0].proof, ComplaintProof::from_bytes(&bytes)?);
Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use crate::utils::{String, Vec};
/// Errors that may happen during Key Generation
#[derive(Debug, PartialEq, Eq)]
pub enum Error<C: CipherSuite> {
/// Serialisation error
/// Serialization error
SerializationError,
/// Deserialisation error
/// Deserialization error
DeserializationError,
/// Point compression error
CompressionError,
Expand Down
2 changes: 1 addition & 1 deletion src/parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ mod test {
use rand::{rngs::OsRng, RngCore};

#[test]
fn test_serialisation() {
fn test_serialization() {
let mut rng = OsRng;

for _ in 0..100 {
Expand Down
2 changes: 1 addition & 1 deletion src/sign/precomputation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ mod test {
}

#[test]
fn test_serialisation() {
fn test_serialization() {
let mut rng = OsRng;

for _ in 0..100 {
Expand Down

0 comments on commit f34f223

Please sign in to comment.