@@ -51,7 +51,7 @@ namespace nil {
5151
5252 typedef std::array<var, ratio> non_native_var_type;
5353 typedef std::array<native_field_type::value_type, ratio> chopped_value_type;
54-
54+
5555 constexpr static const std::array<std::size_t , ratio> chunk_sizes = {66 , 66 , 66 , 66 };
5656
5757
@@ -60,15 +60,15 @@ namespace nil {
6060 assert (i_th < ratio && " non-native type does not have that much chunks!" );
6161 native_field_type::extended_integral_type result = native_field_type::extended_integral_type (input.data );
6262 native_field_type::integral_type base = 1 ;
63- native_field_type::integral_type mask = (base << chunk_sizes[i_th]) - 1 ;
63+ native_field_type::integral_type mask = (base << chunk_sizes[i_th]) - 1 ;
6464 std::size_t shift = 0 ;
6565 for (std::size_t i = 1 ; i <= i_th; i++) {
6666 shift += chunk_sizes[i - 1 ];
6767 }
68-
68+
6969 return (result >> shift) & mask;
7070 }
71-
71+
7272
7373 static chopped_value_type chop_non_native (non_native_field_type::value_type input) {
7474 chopped_value_type result;
@@ -103,13 +103,13 @@ namespace nil {
103103 typename crypto3::algebra::curves::pallas::scalar_field_type> {
104104
105105 constexpr static const std::uint32_t ratio = 2 ; // 254, 1 bits
106- using non_native_field_type = typename crypto3::algebra::curves::ed25519::base_field_type ;
106+ using non_native_field_type = typename crypto3::algebra::curves::pallas::scalar_field_type ;
107107 using native_field_type = typename crypto3::algebra::curves::pallas::base_field_type;
108108 using var = crypto3::zk::snark::plonk_variable<native_field_type>;
109109
110110 typedef std::array<var, ratio> non_native_var_type;
111111 typedef std::array<native_field_type::value_type, ratio> chopped_value_type;
112-
112+
113113 constexpr static const std::array<std::size_t , ratio> chunk_sizes = {254 , 1 };
114114
115115
@@ -118,15 +118,15 @@ namespace nil {
118118 assert (i_th < ratio && " non-native type does not have that much chunks!" );
119119 native_field_type::extended_integral_type result = native_field_type::extended_integral_type (input.data );
120120 native_field_type::integral_type base = 1 ;
121- native_field_type::integral_type mask = (base << chunk_sizes[i_th]) - 1 ;
121+ native_field_type::integral_type mask = (base << chunk_sizes[i_th]) - 1 ;
122122 std::size_t shift = 0 ;
123123 for (std::size_t i = 1 ; i <= i_th; i++) {
124124 shift += chunk_sizes[i - 1 ];
125125 }
126-
126+
127127 return (result >> shift) & mask;
128128 }
129-
129+
130130
131131 static chopped_value_type chop_non_native (non_native_field_type::value_type input) {
132132 chopped_value_type result;
0 commit comments