We useded25519_batch_verify in runtime from sp_io::crypto mod.

sp_io::Crypto and Verify traits require self, but I cannot find implementation.

In substrate primitives core I see verify calling

    fn verify<M: AsRef<[u8]>>(sig: &Signature, message: M, public: &Public) -> bool {
        let Ok(public) = VerificationKey::try_from(public.as_slice()) else { return false };
        let Ok(signature) = ed25519_zebra::Signature::try_from(sig.as_ref()) else { return false };
        public.verify(&signature, message.as_ref()).is_ok()

but does it call host functions for perfromance?


# This feature enables all crypto primitives for `no_std` builds like microcontrollers
# or Intel SGX.
# For the regular wasm runtime builds this should not be used.
full_crypto = [

So that code not to be used in Runtime.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.