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

chore: misc comments #58

Merged
merged 1 commit into from
Sep 11, 2023
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
2 changes: 1 addition & 1 deletion mpz-core/src/cointoss/receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub mod receiver_state {

opaque_debug::implement!(Initialized);

/// The receiver's state after receiving the sender's commitment.
/// The receiver's state after receiving the sender's commitment and revealing one's own seed.
pub struct Received {
pub(super) seeds: Vec<Block>,
pub(super) commitment: Hash,
Expand Down
5 changes: 4 additions & 1 deletion ot/mpz-ot-core/src/kos/receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,10 @@ pub mod state {

opaque_debug::implement!(Initialized);

/// The receiver's state after base setup
/// The receiver's state after the setup phase.
///
/// In this state the receiver performs OT extension (potentially multiple times). Also in this
/// state the receiver sends OT requests.
pub struct Extension {
/// Receiver's rngs
pub(super) rngs: Vec<[ChaCha20Rng; 2]>,
Expand Down
5 changes: 4 additions & 1 deletion ot/mpz-ot-core/src/kos/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,10 @@ pub mod state {

opaque_debug::implement!(Initialized);

/// The sender's state after base OT setup
/// The sender's state after the setup phase.
///
/// In this state the sender performs OT extension (potentially multiple times). Also in this
/// state the sender responds to OT requests.
pub struct Extension {
/// Sender's base OT choices
pub(super) delta: Block,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ impl From<P256> for [u8; 32] {
impl TryFrom<[u8; 32]> for P256 {
type Error = ark_serialize::SerializationError;

/// Converts little-endian bytes into a P256 field element.
fn try_from(value: [u8; 32]) -> Result<Self, Self::Error> {
Fq::deserialize_with_mode(&value[..], Compress::No, Validate::Yes).map(P256)
}
Expand Down