0

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?

UPDATE:

# 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 = [
    ...
    "ed25519-zebra",
    ...
]

So that code not to be used in Runtime.

0

Your Answer

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

Browse other questions tagged or ask your own question.