Skip to main content

commit

Function commit 

Source
pub fn commit(msg: &[u8]) -> (HashOutput, Vec<u8>)
Expand description

Commits to a given message.

Given a message, this function generates a random salt of size 2*lambda_c and computes the corresponding commitment.

The sender should first communicate the commitment. When he wants to decommit, he sends the message together with the salt.