From 738849ff89c2f31ba582a64aaf781d69961f27ab Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 4 Jul 2023 16:58:28 -0700 Subject: [PATCH] Use Ed25519 verify_strict function rather than just verify, fix #857 --- soroban-env-host/src/host/crypto.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/soroban-env-host/src/host/crypto.rs b/soroban-env-host/src/host/crypto.rs index 6d8126c88..1cf789077 100644 --- a/soroban-env-host/src/host/crypto.rs +++ b/soroban-env-host/src/host/crypto.rs @@ -55,12 +55,11 @@ impl Host { public_key: &ed25519_dalek::PublicKey, sig: &ed25519_dalek::Signature, ) -> Result<(), HostError> { - use ed25519_dalek::Verifier; self.charge_budget( ContractCostType::VerifyEd25519Sig, Some(payload.len() as u64), )?; - public_key.verify(payload, sig).map_err(|_| { + public_key.verify_strict(payload, sig).map_err(|_| { self.err( ScErrorType::Crypto, ScErrorCode::InvalidInput,