From d30a62a6c6cea3fa7b99f3fe01ee1062ff9e6e46 Mon Sep 17 00:00:00 2001 From: echo Date: Fri, 10 Mar 2023 16:08:37 +0800 Subject: [PATCH] Opt `deserialize_compressed` -> `deserialize_compressed_unchecked` (#1009) --- precompile/bls12-381/src/bls/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/precompile/bls12-381/src/bls/mod.rs b/precompile/bls12-381/src/bls/mod.rs index 2566f3007..c185fb13d 100644 --- a/precompile/bls12-381/src/bls/mod.rs +++ b/precompile/bls12-381/src/bls/mod.rs @@ -75,7 +75,7 @@ impl From for PublicKey { } impl PublicKey { pub fn from_bytes(bytes: &[u8]) -> Result { - let p = G1Affine::deserialize_compressed(bytes)?; + let p = G1Affine::deserialize_compressed_unchecked(bytes)?; Ok(Self(p.into())) } @@ -104,11 +104,11 @@ pub fn hash_to_curve_g2(message: &[u8]) -> Result