File tree Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ impl DecompressPoint<Secp256k1> for AffinePoint {
154154 let y = FieldElement :: conditional_select (
155155 & beta. negate ( 1 ) ,
156156 & beta,
157- beta. normalize ( ) . is_odd ( ) . ct_eq ( & y_is_odd) ,
157+ beta. is_odd ( ) . ct_eq ( & y_is_odd) ,
158158 ) ;
159159
160160 Self {
Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ impl FieldElementImpl {
8989 }
9090
9191 pub fn is_odd ( & self ) -> Choice {
92- debug_assert ! ( self . normalized) ;
93- self . value . is_odd ( )
92+ self . normalize ( ) . value . is_odd ( )
9493 }
9594
9695 pub fn negate ( & self , magnitude : u32 ) -> Self {
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ impl OsswuMap for FieldElement {
126126 // if e2, y = y1, else y = y2
127127 let mut y = Self :: conditional_select ( & y2, & y1, e2) ;
128128
129- y. conditional_assign ( & -y, self . normalize ( ) . sgn0 ( ) ^ y. normalize ( ) . sgn0 ( ) ) ;
129+ y. conditional_assign ( & -y, self . sgn0 ( ) ^ y. sgn0 ( ) ) ;
130130 ( x, y)
131131 }
132132}
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ impl SignPrimitive<Secp256k1> for Scalar {
183183 }
184184
185185 let signature = Signature :: from_scalars ( r, s) ?;
186- let is_r_odd: bool = R . y . normalize ( ) . is_odd ( ) . into ( ) ;
186+ let is_r_odd: bool = R . y . is_odd ( ) . into ( ) ;
187187 let is_s_high: bool = signature. s ( ) . is_high ( ) . into ( ) ;
188188 let signature_low = signature. normalize_s ( ) . unwrap_or ( signature) ;
189189 let recovery_id = ecdsa_core:: RecoveryId :: new ( is_r_odd ^ is_s_high, false ) ;
You can’t perform that action at this time.
0 commit comments