@@ -10,10 +10,7 @@ pub trait IetfSuite: Suite {}
1010
1111impl < T > IetfSuite for T where T : Suite { }
1212
13- /// VRF proof generic over the cipher suite.
14- ///
15- /// An output point which can be used to derive the actual output together
16- /// with the actual proof of the input point and the associated data.
13+ /// VRF proof generic over the suite.
1714#[ derive( Debug , Clone ) ]
1815pub struct Proof < S : IetfSuite > {
1916 pub c : ScalarField < S > ,
@@ -24,7 +21,7 @@ impl<S: IetfSuite> CanonicalSerialize for Proof<S> {
2421 fn serialize_with_mode < W : ark_serialize:: Write > (
2522 & self ,
2623 mut writer : W ,
27- _compress_always : ark_serialize:: Compress ,
24+ compress : ark_serialize:: Compress ,
2825 ) -> Result < ( ) , ark_serialize:: SerializationError > {
2926 let c_buf = codec:: scalar_encode :: < S > ( & self . c ) ;
3027 if c_buf. len ( ) < S :: CHALLENGE_LEN {
@@ -37,7 +34,7 @@ impl<S: IetfSuite> CanonicalSerialize for Proof<S> {
3734 & c_buf[ ..S :: CHALLENGE_LEN ]
3835 } ;
3936 writer. write_all ( buf) ?;
40- self . s . serialize_compressed ( & mut writer) ?;
37+ self . s . serialize_with_mode ( & mut writer, compress ) ?;
4138 Ok ( ( ) )
4239 }
4340
@@ -49,7 +46,7 @@ impl<S: IetfSuite> CanonicalSerialize for Proof<S> {
4946impl < S : IetfSuite > CanonicalDeserialize for Proof < S > {
5047 fn deserialize_with_mode < R : ark_serialize:: Read > (
5148 mut reader : R ,
52- _compress_always : ark_serialize:: Compress ,
49+ compress : ark_serialize:: Compress ,
5350 validate : ark_serialize:: Validate ,
5451 ) -> Result < Self , ark_serialize:: SerializationError > {
5552 let mut c_buf = ark_std:: vec![ 0 ; S :: CHALLENGE_LEN ] ;
@@ -59,7 +56,7 @@ impl<S: IetfSuite> CanonicalDeserialize for Proof<S> {
5956 let c = codec:: scalar_decode :: < S > ( & c_buf) ;
6057 let s = <ScalarField < S > as CanonicalDeserialize >:: deserialize_with_mode (
6158 & mut reader,
62- ark_serialize :: Compress :: No ,
59+ compress ,
6360 validate,
6461 ) ?;
6562 Ok ( Proof { c, s } )
0 commit comments