Skip to content

Commit

Permalink
Fixed "to_bytes" function (#1052)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Hesmert <[email protected]>
  • Loading branch information
janhesmert and Jan Hesmert authored May 28, 2024
1 parent a1fabfb commit 4d3dd07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bp256/src/arithmetic/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl FieldElement {

/// Returns the big-endian encoding of this [`FieldElement`].
pub fn to_bytes(self) -> FieldBytes {
self.0.to_be_byte_array()
self.to_canonical().to_be_byte_array()
}

/// Translate [`FieldElement`] out of the Montgomery domain, returning a
Expand Down

0 comments on commit 4d3dd07

Please sign in to comment.