File tree Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -102,25 +102,16 @@ where
102102 use ark_ec:: hashing:: { map_to_curve_hasher:: MapToCurveBasedHasher , HashToCurve } ;
103103 use ark_ff:: field_hashers:: DefaultFieldHasher ;
104104
105- const SEC_PARAM : usize = 128 ;
106-
107105 // Domain Separation Tag := "ECVRF_" || h2c_suite_ID_string || suite_string
108- let dst: Vec < _ > = b"ECVRF_"
109- . iter ( )
110- . chain ( h2c_suite_id)
111- . chain ( S :: SUITE_ID )
112- . cloned ( )
113- . collect ( ) ;
114-
115- let hasher = MapToCurveBasedHasher :: <
106+ let dst: Vec < _ > = [ b"ECVRF_" , h2c_suite_id, S :: SUITE_ID ] . concat ( ) ;
107+
108+ MapToCurveBasedHasher :: <
116109 <AffinePoint < S > as AffineRepr >:: Group ,
117- DefaultFieldHasher < <S as Suite >:: Hasher , SEC_PARAM > ,
110+ DefaultFieldHasher < <S as Suite >:: Hasher , 128 > ,
118111 Elligator2Map < CurveConfig < S > > ,
119112 > :: new ( & dst)
120- . ok ( ) ?;
121-
122- let res = hasher. hash ( data) . ok ( ) ?;
123- Some ( res)
113+ . and_then ( |hasher| hasher. hash ( data) )
114+ . ok ( )
124115}
125116
126117/// Challenge generation according to RFC-9381 section 5.4.3.
You can’t perform that action at this time.
0 commit comments