We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1f259c commit b26f055Copy full SHA for b26f055
src/field_elem.rs
@@ -141,9 +141,9 @@ impl FieldElement {
141
142
/// Hash an arbitrary sized message using SHAKE and return output as a field element
143
pub fn from_msg_hash(msg: &[u8]) -> Self {
144
- let mut value = BigNum::new();
+ let mut value = hash_mod_order(msg);
145
while value.iszilch() {
146
- value = hash_mod_order(msg);
+ value.inc(1);
147
}
148
FieldElement { value }
149
0 commit comments