From e3eb836b8e00ac079bc11c1934b1775065b55cfe Mon Sep 17 00:00:00 2001 From: echo Date: Fri, 10 Mar 2023 15:30:50 +0800 Subject: [PATCH] Opt `deserialize_compressed` -> `deserialize_compressed_unchecked` --- 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