@@ -51,8 +51,7 @@ impl ArkTranscript {
51
51
#[ cfg( test) ]
52
52
mod tests {
53
53
use ark_bls12_381:: Bls12_381 ;
54
- use ark_ec:: twisted_edwards:: { Affine , TECurveConfig } ;
55
- use ark_ec:: { AffineRepr , CurveGroup } ;
54
+ use ark_ec:: CurveGroup ;
56
55
use ark_ed_on_bls12_381_bandersnatch:: { BandersnatchConfig , EdwardsAffine , Fq , Fr } ;
57
56
use ark_std:: ops:: Mul ;
58
57
use ark_std:: rand:: Rng ;
@@ -68,31 +67,6 @@ mod tests {
68
67
69
68
use super :: * ;
70
69
71
- // Try and increment hash to curve.
72
- fn hash_to_curve < F : PrimeField , Curve : TECurveConfig < BaseField = F > > (
73
- message : & [ u8 ] ,
74
- ) -> Affine < Curve > {
75
- use blake2:: Digest ;
76
- let mut seed = message. to_vec ( ) ;
77
- let cnt_offset = seed. len ( ) ;
78
- seed. push ( 0 ) ;
79
- loop {
80
- let hash: [ u8 ; 64 ] = blake2:: Blake2b :: digest ( & seed[ ..] ) . into ( ) ;
81
- let x = F :: from_le_bytes_mod_order ( & hash) ;
82
- if let Some ( point) = Affine :: < Curve > :: get_point_from_y_unchecked ( x, false ) {
83
- let point = point. clear_cofactor ( ) ;
84
- assert ! ( point. is_in_correct_subgroup_assuming_on_curve( ) ) ;
85
- return point;
86
- }
87
- seed[ cnt_offset] += 1 ;
88
- }
89
- }
90
-
91
- pub ( crate ) fn padding_point < F : PrimeField , Curve : TECurveConfig < BaseField = F > > (
92
- ) -> Affine < Curve > {
93
- hash_to_curve ( b"/w3f/w3f-ring-proof/padding" )
94
- }
95
-
96
70
fn setup < R : Rng , CS : PCS < Fq > > (
97
71
rng : & mut R ,
98
72
domain_size : usize ,
@@ -103,7 +77,7 @@ mod tests {
103
77
let domain = Domain :: new ( domain_size, true ) ;
104
78
let h = EdwardsAffine :: rand ( rng) ;
105
79
let seed = EdwardsAffine :: rand ( rng) ;
106
- let pad = padding_point ( ) ;
80
+ let pad = EdwardsAffine :: rand ( rng ) ;
107
81
let piop_params = PiopParams :: setup ( domain, h, seed, pad) ;
108
82
109
83
( pcs_params, piop_params)
0 commit comments