diff --git a/Cargo.lock b/Cargo.lock
index 8315bebc6830427e44f0d872417c43dc10804694..8cedf9f2c7423776d247f22c4f4bbbc3e3afa685 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -327,6 +327,18 @@ dependencies = [
  "ark-std",
 ]
 
+[[package]]
+name = "ark-bls12-377-ext"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55"
+dependencies = [
+ "ark-bls12-377",
+ "ark-ec",
+ "ark-models-ext",
+ "ark-std",
+]
+
 [[package]]
 name = "ark-bls12-381"
 version = "0.4.0"
@@ -339,6 +351,20 @@ dependencies = [
  "ark-std",
 ]
 
+[[package]]
+name = "ark-bls12-381-ext"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c"
+dependencies = [
+ "ark-bls12-381",
+ "ark-ec",
+ "ark-ff",
+ "ark-models-ext",
+ "ark-serialize",
+ "ark-std",
+]
+
 [[package]]
 name = "ark-bw6-761"
 version = "0.4.0"
@@ -351,6 +377,19 @@ dependencies = [
  "ark-std",
 ]
 
+[[package]]
+name = "ark-bw6-761-ext"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2"
+dependencies = [
+ "ark-bw6-761",
+ "ark-ec",
+ "ark-ff",
+ "ark-models-ext",
+ "ark-std",
+]
+
 [[package]]
 name = "ark-ec"
 version = "0.4.2"
@@ -365,6 +404,7 @@ dependencies = [
  "hashbrown 0.13.2",
  "itertools 0.10.5",
  "num-traits",
+ "rayon",
  "zeroize",
 ]
 
@@ -380,6 +420,19 @@ dependencies = [
  "ark-std",
 ]
 
+[[package]]
+name = "ark-ed-on-bls12-377-ext"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d"
+dependencies = [
+ "ark-ec",
+ "ark-ed-on-bls12-377",
+ "ark-ff",
+ "ark-models-ext",
+ "ark-std",
+]
+
 [[package]]
 name = "ark-ed-on-bls12-381-bandersnatch"
 version = "0.4.0"
@@ -392,6 +445,19 @@ dependencies = [
  "ark-std",
 ]
 
+[[package]]
+name = "ark-ed-on-bls12-381-bandersnatch-ext"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346"
+dependencies = [
+ "ark-ec",
+ "ark-ed-on-bls12-381-bandersnatch",
+ "ark-ff",
+ "ark-models-ext",
+ "ark-std",
+]
+
 [[package]]
 name = "ark-ff"
 version = "0.4.2"
@@ -435,6 +501,19 @@ dependencies = [
  "syn 1.0.109",
 ]
 
+[[package]]
+name = "ark-models-ext"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-serialize",
+ "ark-std",
+ "derivative",
+]
+
 [[package]]
 name = "ark-poly"
 version = "0.4.2"
@@ -508,6 +587,7 @@ checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185"
 dependencies = [
  "num-traits",
  "rand 0.8.5",
+ "rayon",
 ]
 
 [[package]]
@@ -17179,11 +17259,16 @@ name = "sp-crypto-ec-utils"
 version = "0.4.0"
 dependencies = [
  "ark-bls12-377",
+ "ark-bls12-377-ext",
  "ark-bls12-381",
+ "ark-bls12-381-ext",
  "ark-bw6-761",
+ "ark-bw6-761-ext",
  "ark-ec",
  "ark-ed-on-bls12-377",
+ "ark-ed-on-bls12-377-ext",
  "ark-ed-on-bls12-381-bandersnatch",
+ "ark-ed-on-bls12-381-bandersnatch-ext",
  "ark-scale",
  "sp-runtime-interface",
  "sp-std",
diff --git a/substrate/primitives/crypto/ec-utils/Cargo.toml b/substrate/primitives/crypto/ec-utils/Cargo.toml
index e091385071c9c3e62f77f817952d5e46dd42a1e7..651fc96d7ac1e0d7a0d118a6eb5fca0673e06f96 100644
--- a/substrate/primitives/crypto/ec-utils/Cargo.toml
+++ b/substrate/primitives/crypto/ec-utils/Cargo.toml
@@ -12,26 +12,53 @@ repository.workspace = true
 targets = ["x86_64-unknown-linux-gnu"]
 
 [dependencies]
-ark-ec = { version = "0.4.2", default-features = false }
-ark-bls12-377 = { version = "0.4.0", features = ["curve"], default-features = false }
-ark-bls12-381 = { version = "0.4.0", features = ["curve"], default-features = false }
-ark-bw6-761 = { version = "0.4.0", default-features = false }
-ark-ed-on-bls12-381-bandersnatch = { version = "0.4.0", default-features = false }
-ark-ed-on-bls12-377 = { version = "0.4.0", default-features = false }
-ark-scale = { version = "0.0.11", features = ["hazmat"], default-features = false }
-sp-runtime-interface = { path = "../../runtime-interface", default-features = false}
-sp-std = { path = "../../std", default-features = false }
+ark-ec = { version = "0.4.2", default-features = false, optional = true }
+ark-bls12-377-ext = { version = "0.4.1", default-features = false, optional = true }
+ark-bls12-377 = { version = "0.4.0", default-features = false, features = ["curve"], optional = true }
+ark-bls12-381-ext = { version = "0.4.1", default-features = false, optional = true }
+ark-bls12-381 = { version = "0.4.0", default-features = false, features = ["curve"], optional = true }
+ark-bw6-761-ext = { version = "0.4.1", default-features = false, optional = true }
+ark-bw6-761 = { version = "0.4.0", default-features = false, optional = true }
+ark-ed-on-bls12-381-bandersnatch-ext = { version = "0.4.1", default-features = false, optional = true }
+ark-ed-on-bls12-381-bandersnatch = { version = "0.4.0", default-features = false, optional = true }
+ark-ed-on-bls12-377-ext = { version = "0.4.1", default-features = false, optional = true }
+ark-ed-on-bls12-377 = { version = "0.4.0", default-features = false, optional = true }
+ark-scale = { version = "0.0.11", default-features = false, features = ["hazmat"], optional = true }
+sp-runtime-interface = { path = "../../runtime-interface", default-features = false, optional = true }
+sp-std = { path = "../../std", default-features = false, optional = true }
 
 [features]
 default = [ "std" ]
 std = [
-	"ark-bls12-377/std",
-	"ark-bls12-381/std",
-	"ark-bw6-761/std",
-	"ark-ec/std",
-	"ark-ed-on-bls12-377/std",
-	"ark-ed-on-bls12-381-bandersnatch/std",
-	"ark-scale/std",
-	"sp-runtime-interface/std",
-	"sp-std/std",
+	"ark-bls12-377-ext?/std",
+	"ark-bls12-377?/std",
+	"ark-bls12-381-ext?/std",
+	"ark-bls12-381?/std",
+	"ark-bw6-761-ext?/std",
+	"ark-bw6-761?/std",
+	"ark-ec?/parallel",
+	"ark-ed-on-bls12-377-ext?/std",
+	"ark-ed-on-bls12-377?/std",
+	"ark-ed-on-bls12-381-bandersnatch-ext?/std",
+	"ark-ed-on-bls12-381-bandersnatch?/std",
+	"ark-scale?/std",
+	"sp-runtime-interface?/std",
+	"sp-std?/std",
+]
+common = [ "ark-ec", "ark-scale", "sp-runtime-interface", "sp-std" ]
+bls12-377 = [ "ark-bls12-377", "ark-bls12-377-ext", "common" ]
+bls12-381 = [ "ark-bls12-381", "ark-bls12-381-ext", "common" ]
+bw6-761 = [ "ark-bw6-761", "ark-bw6-761-ext", "common" ]
+ed-on-bls12-377 = [ "ark-ed-on-bls12-377", "ark-ed-on-bls12-377-ext", "common" ]
+ed-on-bls12-381-bandersnatch = [
+	"ark-ed-on-bls12-381-bandersnatch",
+	"ark-ed-on-bls12-381-bandersnatch-ext",
+	"common",
+]
+all-curves = [
+	"bls12-377",
+	"bls12-381",
+	"bw6-761",
+	"ed-on-bls12-377",
+	"ed-on-bls12-381-bandersnatch",
 ]
diff --git a/substrate/primitives/crypto/ec-utils/src/bls12_377.rs b/substrate/primitives/crypto/ec-utils/src/bls12_377.rs
new file mode 100644
index 0000000000000000000000000000000000000000..8f19a2c4a1911f0d1045d0eebf98958236830e0f
--- /dev/null
+++ b/substrate/primitives/crypto/ec-utils/src/bls12_377.rs
@@ -0,0 +1,205 @@
+// This file is part of Substrate.
+
+// Copyright (C) Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 	http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! *BLS12-377* types and host functions.
+
+use crate::utils;
+use ark_bls12_377_ext::CurveHooks;
+use ark_ec::{pairing::Pairing, CurveConfig};
+use sp_runtime_interface::runtime_interface;
+use sp_std::vec::Vec;
+
+/// First pairing group definitions.
+pub mod g1 {
+	pub use ark_bls12_377_ext::g1::{
+		G1_GENERATOR_X, G1_GENERATOR_Y, TE_GENERATOR_X, TE_GENERATOR_Y,
+	};
+	/// Group configuration.
+	pub type Config = ark_bls12_377_ext::g1::Config<super::HostHooks>;
+	/// Short Weierstrass form point affine representation.
+	pub type G1Affine = ark_bls12_377_ext::g1::G1Affine<super::HostHooks>;
+	/// Short Weierstrass form point projective representation.
+	pub type G1Projective = ark_bls12_377_ext::g1::G1Projective<super::HostHooks>;
+	/// Short Weierstrass form point affine representation.
+	pub type G1SWAffine = ark_bls12_377_ext::g1::G1SWAffine<super::HostHooks>;
+	/// Short Weierstrass form point projective representation.
+	pub type G1SWProjective = ark_bls12_377_ext::g1::G1SWProjective<super::HostHooks>;
+	/// Twisted Edwards form point affine representation.
+	pub type G1TEAffine = ark_bls12_377_ext::g1::G1TEAffine<super::HostHooks>;
+	/// Twisted Edwards form point projective representation.
+	pub type G1TEProjective = ark_bls12_377_ext::g1::G1TEProjective<super::HostHooks>;
+}
+
+/// Second pairing group definitions.
+pub mod g2 {
+	pub use ark_bls12_377_ext::g2::{
+		G2_GENERATOR_X, G2_GENERATOR_X_C0, G2_GENERATOR_X_C1, G2_GENERATOR_Y, G2_GENERATOR_Y_C0,
+		G2_GENERATOR_Y_C1,
+	};
+	/// Group configuration.
+	pub type Config = ark_bls12_377_ext::g2::Config<super::HostHooks>;
+	/// Short Weierstrass form point affine representation.
+	pub type G2Affine = ark_bls12_377_ext::g2::G2Affine<super::HostHooks>;
+	/// Short Weierstrass form point projective representation.
+	pub type G2Projective = ark_bls12_377_ext::g2::G2Projective<super::HostHooks>;
+}
+
+pub use self::{
+	g1::{Config as G1Config, G1Affine, G1Projective},
+	g2::{Config as G2Config, G2Affine, G2Projective},
+};
+
+/// Curve hooks jumping into [`host_calls`] host functions.
+#[derive(Copy, Clone)]
+pub struct HostHooks;
+
+/// Configuration for *BLS12-377* curve.
+pub type Config = ark_bls12_377_ext::Config<HostHooks>;
+
+/// *BLS12-377* definition.
+///
+/// A generic *BLS12* model specialized with *BLS12-377* configuration.
+pub type Bls12_377 = ark_bls12_377_ext::Bls12_377<HostHooks>;
+
+impl CurveHooks for HostHooks {
+	fn bls12_377_multi_miller_loop(
+		g1: impl Iterator<Item = <Bls12_377 as Pairing>::G1Prepared>,
+		g2: impl Iterator<Item = <Bls12_377 as Pairing>::G2Prepared>,
+	) -> Result<<Bls12_377 as Pairing>::TargetField, ()> {
+		let g1 = utils::encode(g1.collect::<Vec<_>>());
+		let g2 = utils::encode(g2.collect::<Vec<_>>());
+		let res = host_calls::bls12_377_multi_miller_loop(g1, g2).unwrap_or_default();
+		utils::decode(res)
+	}
+
+	fn bls12_377_final_exponentiation(
+		target: <Bls12_377 as Pairing>::TargetField,
+	) -> Result<<Bls12_377 as Pairing>::TargetField, ()> {
+		let target = utils::encode(target);
+		let res = host_calls::bls12_377_final_exponentiation(target).unwrap_or_default();
+		utils::decode(res)
+	}
+
+	fn bls12_377_msm_g1(
+		bases: &[G1Affine],
+		scalars: &[<G1Config as CurveConfig>::ScalarField],
+	) -> Result<G1Projective, ()> {
+		let bases = utils::encode(bases);
+		let scalars = utils::encode(scalars);
+		let res = host_calls::bls12_377_msm_g1(bases, scalars).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+
+	fn bls12_377_msm_g2(
+		bases: &[G2Affine],
+		scalars: &[<G2Config as CurveConfig>::ScalarField],
+	) -> Result<G2Projective, ()> {
+		let bases = utils::encode(bases);
+		let scalars = utils::encode(scalars);
+		let res = host_calls::bls12_377_msm_g2(bases, scalars).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+
+	fn bls12_377_mul_projective_g1(
+		base: &G1Projective,
+		scalar: &[u64],
+	) -> Result<G1Projective, ()> {
+		let base = utils::encode_proj_sw(base);
+		let scalar = utils::encode(scalar);
+		let res = host_calls::bls12_377_mul_projective_g1(base, scalar).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+
+	fn bls12_377_mul_projective_g2(
+		base: &G2Projective,
+		scalar: &[u64],
+	) -> Result<G2Projective, ()> {
+		let base = utils::encode_proj_sw(base);
+		let scalar = utils::encode(scalar);
+		let res = host_calls::bls12_377_mul_projective_g2(base, scalar).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+}
+
+/// Interfaces for working with *Arkworks* *BLS12-377* elliptic curve related types
+/// from within the runtime.
+///
+/// All types are (de-)serialized through the wrapper types from the `ark-scale` trait,
+/// with `ark_scale::{ArkScale, ArkScaleProjective}`.
+///
+/// `ArkScale`'s `Usage` generic parameter is expected to be set to "not-validated"
+/// and "not-compressed".
+#[runtime_interface]
+pub trait HostCalls {
+	/// Pairing multi Miller loop for *BLS12-377*.
+	///
+	/// - Receives encoded:
+	///   - `a`: `ArkScale<Vec<G1Affine>>`.
+	///   - `b`: `ArkScale<Vec<G2Affine>>`.
+	/// - Returns encoded:  `ArkScale<Bls12_377::TargetField>`.
+	fn bls12_377_multi_miller_loop(a: Vec<u8>, b: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::multi_miller_loop::<ark_bls12_377::Bls12_377>(a, b)
+	}
+
+	/// Pairing final exponentiation for *BLS12-377.*
+	///
+	/// - Receives encoded: `ArkScale<Bls12_377::TargetField>`.
+	/// - Returns encoded:  `ArkScale<Bls12_377::TargetField>`.
+	fn bls12_377_final_exponentiation(f: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::final_exponentiation::<ark_bls12_377::Bls12_377>(f)
+	}
+
+	/// Multi scalar multiplication on *G1* for *BLS12-377*.
+	///
+	/// - Receives encoded:
+	///   - `bases`: `ArkScale<Vec<G1Affine>>`.
+	///   - `scalars`: `ArkScale<Vec<G1Config::ScalarField>>`.
+	/// - Returns encoded: `ArkScaleProjective<G1Projective>`.
+	fn bls12_377_msm_g1(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::msm_sw::<ark_bls12_377::g1::Config>(bases, scalars)
+	}
+
+	/// Multi scalar multiplication on *G2* for *BLS12-377*.
+	///
+	/// - Receives encoded:
+	///   - `bases`: `ArkScale<Vec<G2Affine>>`.
+	///   - `scalars`: `ArkScale<Vec<G2Config::ScalarField>>`.
+	/// - Returns encoded: `ArkScaleProjective<G2Projective>`.
+	fn bls12_377_msm_g2(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::msm_sw::<ark_bls12_377::g2::Config>(bases, scalars)
+	}
+
+	/// Projective multiplication on *G1* for *BLS12-377*.
+	///
+	/// - Receives encoded:
+	///   - `base`: `ArkScaleProjective<G1Projective>`.
+	///   - `scalar`: `ArkScale<Vec<u64>>`.
+	/// - Returns encoded: `ArkScaleProjective<G1Projective>`.
+	fn bls12_377_mul_projective_g1(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::mul_projective_sw::<ark_bls12_377::g1::Config>(base, scalar)
+	}
+
+	/// Projective multiplication on *G2* for *BLS12-377*.
+	///
+	/// - Receives encoded:
+	///   - `base`: `ArkScaleProjective<G2Projective>`.
+	///   - `scalar`: `ArkScale<Vec<u64>>`.
+	/// - Returns encoded: `ArkScaleProjective<ark_bls12_377::G2Projective>`.
+	fn bls12_377_mul_projective_g2(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::mul_projective_sw::<ark_bls12_377::g2::Config>(base, scalar)
+	}
+}
diff --git a/substrate/primitives/crypto/ec-utils/src/bls12_381.rs b/substrate/primitives/crypto/ec-utils/src/bls12_381.rs
new file mode 100644
index 0000000000000000000000000000000000000000..99a0289b7ad26b09bcb39e469ec8bf5203e47cb2
--- /dev/null
+++ b/substrate/primitives/crypto/ec-utils/src/bls12_381.rs
@@ -0,0 +1,195 @@
+// This file is part of Substrate.
+
+// Copyright (C) Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 	http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! *BLS12-381* types and host functions.
+
+use crate::utils;
+use ark_bls12_381_ext::CurveHooks;
+use ark_ec::{pairing::Pairing, CurveConfig};
+use sp_runtime_interface::runtime_interface;
+use sp_std::vec::Vec;
+
+/// First pairing group definitions.
+pub mod g1 {
+	pub use ark_bls12_381_ext::g1::{BETA, G1_GENERATOR_X, G1_GENERATOR_Y};
+	/// Group configuration.
+	pub type Config = ark_bls12_381_ext::g1::Config<super::HostHooks>;
+	/// Short Weierstrass form point affine representation.
+	pub type G1Affine = ark_bls12_381_ext::g1::G1Affine<super::HostHooks>;
+	/// Short Weierstrass form point projective representation.
+	pub type G1Projective = ark_bls12_381_ext::g1::G1Projective<super::HostHooks>;
+}
+
+/// Second pairing group definitions.
+pub mod g2 {
+	pub use ark_bls12_381_ext::g2::{
+		G2_GENERATOR_X, G2_GENERATOR_X_C0, G2_GENERATOR_X_C1, G2_GENERATOR_Y, G2_GENERATOR_Y_C0,
+		G2_GENERATOR_Y_C1,
+	};
+	/// Group configuration.
+	pub type Config = ark_bls12_381_ext::g2::Config<super::HostHooks>;
+	/// Short Weierstrass form point affine representation.
+	pub type G2Affine = ark_bls12_381_ext::g2::G2Affine<super::HostHooks>;
+	/// Short Weierstrass form point projective representation.
+	pub type G2Projective = ark_bls12_381_ext::g2::G2Projective<super::HostHooks>;
+}
+
+pub use self::{
+	g1::{Config as G1Config, G1Affine, G1Projective},
+	g2::{Config as G2Config, G2Affine, G2Projective},
+};
+
+/// Curve hooks jumping into [`host_calls`] host functions.
+#[derive(Copy, Clone)]
+pub struct HostHooks;
+
+/// Configuration for *BLS12-381* curve.
+pub type Config = ark_bls12_381_ext::Config<HostHooks>;
+
+/// *BLS12-381* definition.
+///
+/// A generic *BLS12* model specialized with *BLS12-381* configuration.
+pub type Bls12_381 = ark_bls12_381_ext::Bls12_381<HostHooks>;
+
+impl CurveHooks for HostHooks {
+	fn bls12_381_multi_miller_loop(
+		g1: impl Iterator<Item = <Bls12_381 as Pairing>::G1Prepared>,
+		g2: impl Iterator<Item = <Bls12_381 as Pairing>::G2Prepared>,
+	) -> Result<<Bls12_381 as Pairing>::TargetField, ()> {
+		let g1 = utils::encode(g1.collect::<Vec<_>>());
+		let g2 = utils::encode(g2.collect::<Vec<_>>());
+		let res = host_calls::bls12_381_multi_miller_loop(g1, g2).unwrap_or_default();
+		utils::decode(res)
+	}
+
+	fn bls12_381_final_exponentiation(
+		target: <Bls12_381 as Pairing>::TargetField,
+	) -> Result<<Bls12_381 as Pairing>::TargetField, ()> {
+		let target = utils::encode(target);
+		let res = host_calls::bls12_381_final_exponentiation(target).unwrap_or_default();
+		utils::decode(res)
+	}
+
+	fn bls12_381_msm_g1(
+		bases: &[G1Affine],
+		scalars: &[<G1Config as CurveConfig>::ScalarField],
+	) -> Result<G1Projective, ()> {
+		let bases = utils::encode(bases);
+		let scalars = utils::encode(scalars);
+		let res = host_calls::bls12_381_msm_g1(bases, scalars).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+
+	fn bls12_381_msm_g2(
+		bases: &[G2Affine],
+		scalars: &[<G2Config as CurveConfig>::ScalarField],
+	) -> Result<G2Projective, ()> {
+		let bases = utils::encode(bases);
+		let scalars = utils::encode(scalars);
+		let res = host_calls::bls12_381_msm_g2(bases, scalars).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+
+	fn bls12_381_mul_projective_g1(
+		base: &G1Projective,
+		scalar: &[u64],
+	) -> Result<G1Projective, ()> {
+		let base = utils::encode_proj_sw(base);
+		let scalar = utils::encode(scalar);
+		let res = host_calls::bls12_381_mul_projective_g1(base, scalar).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+
+	fn bls12_381_mul_projective_g2(
+		base: &G2Projective,
+		scalar: &[u64],
+	) -> Result<G2Projective, ()> {
+		let base = utils::encode_proj_sw(base);
+		let scalar = utils::encode(scalar);
+		let res = host_calls::bls12_381_mul_projective_g2(base, scalar).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+}
+
+/// Interfaces for working with *Arkworks* *BLS12-381* elliptic curve related types
+/// from within the runtime.
+///
+/// All types are (de-)serialized through the wrapper types from the `ark-scale` trait,
+/// with `ark_scale::{ArkScale, ArkScaleProjective}`.
+///
+/// `ArkScale`'s `Usage` generic parameter is expected to be set to "not-validated"
+/// and "not-compressed".
+#[runtime_interface]
+pub trait HostCalls {
+	/// Pairing multi Miller loop for *BLS12-381*.
+	///
+	/// - Receives encoded:
+	///   - `a`: `ArkScale<Vec<G1Affine>>`.
+	///   - `b`: `ArkScale<Vec<G2Affine>>`.
+	/// - Returns encoded: `ArkScale<Bls12_381::TargetField>`.
+	fn bls12_381_multi_miller_loop(a: Vec<u8>, b: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::multi_miller_loop::<ark_bls12_381::Bls12_381>(a, b)
+	}
+
+	/// Pairing final exponentiation for *BLS12-381*.
+	///
+	/// - Receives encoded: `ArkScale<<Bls12_377::TargetField>`.
+	/// - Returns encoded: `ArkScale<<Bls12_377::TargetField>`
+	fn bls12_381_final_exponentiation(f: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::final_exponentiation::<ark_bls12_381::Bls12_381>(f)
+	}
+
+	/// Multi scalar multiplication on *G1* for *BLS12-381*
+	///
+	/// - Receives encoded:
+	///   - `bases`: `ArkScale<Vec<G1Affine>>`.
+	///   - `scalars`: `ArkScale<Vec<G1Config::ScalarField>>`.
+	/// - Returns encoded: `ArkScaleProjective<ark_bls12_381::G1Projective>`.
+	fn bls12_381_msm_g1(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::msm_sw::<ark_bls12_381::g1::Config>(bases, scalars)
+	}
+
+	/// Multi scalar multiplication on *G2* for *BLS12-381*
+	///
+	/// - Receives encoded:
+	///   - `bases`: `ArkScale<Vec<G2Affine>>`.
+	///   - `scalars`: `ArkScale<Vec<G2Config::ScalarField>>`.
+	/// - Returns encoded: `ArkScaleProjective<G2Projective>`.
+	fn bls12_381_msm_g2(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::msm_sw::<ark_bls12_381::g2::Config>(bases, scalars)
+	}
+
+	/// Projective multiplication on *G1* for *BLS12-381*.
+	///
+	/// - Receives encoded:
+	///   - `base`: `ArkScaleProjective<G1Projective>`.
+	///   - `scalar`: `ArkScale<Vec<u64>>`.
+	/// - Returns encoded: `ArkScaleProjective<G1Projective>`.
+	fn bls12_381_mul_projective_g1(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::mul_projective_sw::<ark_bls12_381::g1::Config>(base, scalar)
+	}
+
+	/// Projective multiplication on *G2* for *BLS12-381*
+	///
+	/// - Receives encoded:
+	///   - `base`: `ArkScaleProjective<G2Projective>`.
+	///   - `scalar`: `ArkScale<Vec<u64>>`.
+	/// - Returns encoded: `ArkScaleProjective<G2Projective>`.
+	fn bls12_381_mul_projective_g2(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::mul_projective_sw::<ark_bls12_381::g2::Config>(base, scalar)
+	}
+}
diff --git a/substrate/primitives/crypto/ec-utils/src/bw6_761.rs b/substrate/primitives/crypto/ec-utils/src/bw6_761.rs
new file mode 100644
index 0000000000000000000000000000000000000000..a68abf6e43e0384a1afe6beafdd99963a6fc48ff
--- /dev/null
+++ b/substrate/primitives/crypto/ec-utils/src/bw6_761.rs
@@ -0,0 +1,186 @@
+// This file is part of Substrate.
+
+// Copyright (C) Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 	http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! *BW6-761* types and host functions.
+
+use crate::utils;
+use ark_bw6_761_ext::CurveHooks;
+use ark_ec::{pairing::Pairing, CurveConfig};
+use sp_runtime_interface::runtime_interface;
+use sp_std::vec::Vec;
+
+/// First pairing group definitions.
+pub mod g1 {
+	pub use ark_bw6_761_ext::g1::{G1_GENERATOR_X, G1_GENERATOR_Y};
+	/// Group configuration.
+	pub type Config = ark_bw6_761_ext::g1::Config<super::HostHooks>;
+	/// Short Weierstrass form point affine representation.
+	pub type G1Affine = ark_bw6_761_ext::g1::G1Affine<super::HostHooks>;
+	/// Short Weierstrass form point projective representation.
+	pub type G1Projective = ark_bw6_761_ext::g1::G1Projective<super::HostHooks>;
+}
+
+/// Second pairing group definitions.
+pub mod g2 {
+	pub use ark_bw6_761_ext::g2::{G2_GENERATOR_X, G2_GENERATOR_Y};
+	/// Group configuration.
+	pub type Config = ark_bw6_761_ext::g2::Config<super::HostHooks>;
+	/// Short Weierstrass form point affine representation.
+	pub type G2Affine = ark_bw6_761_ext::g2::G2Affine<super::HostHooks>;
+	/// Short Weierstrass form point projective representation.
+	pub type G2Projective = ark_bw6_761_ext::g2::G2Projective<super::HostHooks>;
+}
+
+pub use self::{
+	g1::{Config as G1Config, G1Affine, G1Projective},
+	g2::{Config as G2Config, G2Affine, G2Projective},
+};
+
+/// Curve hooks jumping into [`host_calls`] host functions.
+#[derive(Copy, Clone)]
+pub struct HostHooks;
+
+/// Configuration for *BW6-361* curve.
+pub type Config = ark_bw6_761_ext::Config<HostHooks>;
+
+/// *BW6-361* definition.
+///
+/// A generic *BW6* model specialized with *BW6-761* configuration.
+pub type BW6_761 = ark_bw6_761_ext::BW6_761<HostHooks>;
+
+impl CurveHooks for HostHooks {
+	fn bw6_761_multi_miller_loop(
+		g1: impl Iterator<Item = <BW6_761 as Pairing>::G1Prepared>,
+		g2: impl Iterator<Item = <BW6_761 as Pairing>::G2Prepared>,
+	) -> Result<<BW6_761 as Pairing>::TargetField, ()> {
+		let g1 = utils::encode(g1.collect::<Vec<_>>());
+		let g2 = utils::encode(g2.collect::<Vec<_>>());
+		let res = host_calls::bw6_761_multi_miller_loop(g1, g2).unwrap_or_default();
+		utils::decode(res)
+	}
+
+	fn bw6_761_final_exponentiation(
+		target: <BW6_761 as Pairing>::TargetField,
+	) -> Result<<BW6_761 as Pairing>::TargetField, ()> {
+		let target = utils::encode(target);
+		let res = host_calls::bw6_761_final_exponentiation(target).unwrap_or_default();
+		utils::decode(res)
+	}
+
+	fn bw6_761_msm_g1(
+		bases: &[G1Affine],
+		scalars: &[<G1Config as CurveConfig>::ScalarField],
+	) -> Result<G1Projective, ()> {
+		let bases = utils::encode(bases);
+		let scalars = utils::encode(scalars);
+		let res = host_calls::bw6_761_msm_g1(bases, scalars).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+
+	fn bw6_761_msm_g2(
+		bases: &[G2Affine],
+		scalars: &[<G2Config as CurveConfig>::ScalarField],
+	) -> Result<G2Projective, ()> {
+		let bases = utils::encode(bases);
+		let scalars = utils::encode(scalars);
+		let res = host_calls::bw6_761_msm_g2(bases, scalars).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+
+	fn bw6_761_mul_projective_g1(base: &G1Projective, scalar: &[u64]) -> Result<G1Projective, ()> {
+		let base = utils::encode_proj_sw(base);
+		let scalar = utils::encode(scalar);
+		let res = host_calls::bw6_761_mul_projective_g1(base, scalar).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+
+	fn bw6_761_mul_projective_g2(base: &G2Projective, scalar: &[u64]) -> Result<G2Projective, ()> {
+		let base = utils::encode_proj_sw(base);
+		let scalar = utils::encode(scalar);
+		let res = host_calls::bw6_761_mul_projective_g2(base, scalar).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+}
+
+/// Interfaces for working with *Arkworks* *BW6-761* elliptic curve related types
+/// from within the runtime.
+///
+/// All types are (de-)serialized through the wrapper types from the `ark-scale` trait,
+/// with `ark_scale::{ArkScale, ArkScaleProjective}`.
+///
+/// `ArkScale`'s `Usage` generic parameter is expected to be set to "not-validated"
+/// and "not-compressed".
+#[runtime_interface]
+pub trait HostCalls {
+	/// Pairing multi Miller loop for *BW6-761*.
+	///
+	/// - Receives encoded:
+	///   - `a: ArkScale<Vec<G1Affine>>`.
+	///   - `b: ArkScale<Vec<G2Affine>>`.
+	/// - Returns encoded: `ArkScale<BW6_761;:TargetField>`.
+	fn bw6_761_multi_miller_loop(a: Vec<u8>, b: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::multi_miller_loop::<ark_bw6_761::BW6_761>(a, b)
+	}
+
+	/// Pairing final exponentiation for *BW6-761*.
+	///
+	/// - Receives encoded: `ArkScale<BW6_761::TargetField>`.
+	/// - Returns encoded: `ArkScale<BW6_761::TargetField>`.
+	fn bw6_761_final_exponentiation(f: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::final_exponentiation::<ark_bw6_761::BW6_761>(f)
+	}
+
+	/// Multi scalar multiplication on *G1* for *BW6-761*.
+	///
+	/// - Receives encoded:
+	///   - `bases`: `ArkScale<Vec<G1Affine>>`.
+	///   - `scalars`: `ArkScale<G1Config::ScalarField>`.
+	/// - Returns encoded: `ArkScaleProjective<G1Projective>`.
+	fn bw6_761_msm_g1(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::msm_sw::<ark_bw6_761::g1::Config>(bases, scalars)
+	}
+
+	/// Multi scalar multiplication on *G2* for *BW6-761*.
+	///
+	/// - Receives encoded:
+	///   - `bases`: `ArkScale<Vec<G2Affine>>`.
+	///   - `scalars`: `ArkScale<Vec<G2Config::ScalarField>>`.
+	/// - Returns encoded: `ArkScaleProjective<G2Projective>`.
+	fn bw6_761_msm_g2(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::msm_sw::<ark_bw6_761::g2::Config>(bases, scalars)
+	}
+
+	/// Projective multiplication on *G1* for *BW6-761*.
+	///
+	/// - Receives encoded:
+	///   - `base`: `ArkScaleProjective<G1Projective>`.
+	///   - `scalar`: `ArkScale<Vec<u64>>`.
+	/// - Returns encoded: `ArkScaleProjective<G1Projective>`.
+	fn bw6_761_mul_projective_g1(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::mul_projective_sw::<ark_bw6_761::g1::Config>(base, scalar)
+	}
+
+	/// Projective multiplication on *G2* for *BW6-761*.
+	///
+	/// - Receives encoded:
+	///   - `base`: `ArkScaleProjective<G2Projective>`.
+	///   - `scalar`: `ArkScale<Vec<u64>>`.
+	/// - Returns encoded: `ArkScaleProjective<G2Projective>`.
+	fn bw6_761_mul_projective_g2(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::mul_projective_sw::<ark_bw6_761::g2::Config>(base, scalar)
+	}
+}
diff --git a/substrate/primitives/crypto/ec-utils/src/ed_on_bls12_377.rs b/substrate/primitives/crypto/ec-utils/src/ed_on_bls12_377.rs
new file mode 100644
index 0000000000000000000000000000000000000000..a03be41b854284d5a02956f5ae099f1b2c21d4ed
--- /dev/null
+++ b/substrate/primitives/crypto/ec-utils/src/ed_on_bls12_377.rs
@@ -0,0 +1,88 @@
+// This file is part of Substrate.
+
+// Copyright (C) Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 	http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! *Ed-on-BLS12-377* types and host functions.
+
+use crate::utils;
+use ark_ec::CurveConfig;
+use ark_ed_on_bls12_377_ext::CurveHooks;
+use sp_runtime_interface::runtime_interface;
+use sp_std::vec::Vec;
+
+/// Curve hooks jumping into [`host_calls`] host functions.
+#[derive(Copy, Clone)]
+pub struct HostHooks;
+
+/// Group configuration.
+pub type EdwardsConfig = ark_ed_on_bls12_377_ext::EdwardsConfig<HostHooks>;
+/// Twisted Edwards form point affine representation.
+pub type EdwardsAffine = ark_ed_on_bls12_377_ext::EdwardsAffine<HostHooks>;
+/// Twisted Edwards form point projective representation.
+pub type EdwardsProjective = ark_ed_on_bls12_377_ext::EdwardsProjective<HostHooks>;
+
+impl CurveHooks for HostHooks {
+	fn ed_on_bls12_377_msm(
+		bases: &[EdwardsAffine],
+		scalars: &[<EdwardsConfig as CurveConfig>::ScalarField],
+	) -> Result<EdwardsProjective, ()> {
+		let bases = utils::encode(bases);
+		let scalars = utils::encode(scalars);
+		let res = host_calls::ed_on_bls12_377_te_msm(bases, scalars).unwrap_or_default();
+		utils::decode_proj_te(res)
+	}
+
+	fn ed_on_bls12_377_mul_projective(
+		base: &EdwardsProjective,
+		scalar: &[u64],
+	) -> Result<EdwardsProjective, ()> {
+		let base = utils::encode_proj_te(base);
+		let scalar = utils::encode(scalar);
+		let res = host_calls::ed_on_bls12_377_te_mul_projective(base, scalar).unwrap_or_default();
+		utils::decode_proj_te(res)
+	}
+}
+
+/// Interfaces for working with *Arkworks* *Ed-on-BLS12-377* elliptic curve
+/// related types from within the runtime.
+///
+/// All types are (de-)serialized through the wrapper types from the `ark-scale` trait,
+/// with `ark_scale::{ArkScale, ArkScaleProjective}`.
+///
+/// `ArkScale`'s `Usage` generic parameter is expected to be set to "not-validated"
+/// and "not-compressed".
+#[runtime_interface]
+pub trait HostCalls {
+	/// Twisted Edwards multi scalar multiplication for *Ed-on-BLS12-377*.
+	///
+	/// - Receives encoded:
+	///   - `base`: `ArkScaleProjective<EdwardsProjective>`.
+	///   - `scalars`: `ArkScale<Vec<EdwardsConfig::ScalarField>>`.
+	/// - Returns encoded: `ArkScaleProjective<EdwardsProjective>`.
+	fn ed_on_bls12_377_te_msm(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::msm_te::<ark_ed_on_bls12_377::EdwardsConfig>(bases, scalars)
+	}
+
+	/// Twisted Edwards projective multiplication for *Ed-on-BLS12-377*.
+	///
+	/// - Receives encoded:
+	///   - `base`: `ArkScaleProjective<EdwardsProjective>`.
+	///   - `scalar`: `ArkScale<Vec<u64>>`.
+	/// - Returns encoded: `ArkScaleProjective<EdwardsProjective>`.
+	fn ed_on_bls12_377_te_mul_projective(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
+		utils::mul_projective_te::<ark_ed_on_bls12_377::EdwardsConfig>(base, scalar)
+	}
+}
diff --git a/substrate/primitives/crypto/ec-utils/src/ed_on_bls12_381_bandersnatch.rs b/substrate/primitives/crypto/ec-utils/src/ed_on_bls12_381_bandersnatch.rs
new file mode 100644
index 0000000000000000000000000000000000000000..9d63f35876521091fd757c9e7ca15a446fd1f1e9
--- /dev/null
+++ b/substrate/primitives/crypto/ec-utils/src/ed_on_bls12_381_bandersnatch.rs
@@ -0,0 +1,153 @@
+// This file is part of Substrate.
+
+// Copyright (C) Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 	http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! Elliptic Curves host functions to handle some of the *Arkworks* *Ed-on-BLS12-381-Bandersnatch*
+//! computationally expensive operations.
+
+use crate::utils;
+use ark_ec::CurveConfig;
+use ark_ed_on_bls12_381_bandersnatch_ext::CurveHooks;
+use sp_runtime_interface::runtime_interface;
+use sp_std::vec::Vec;
+
+/// Curve hooks jumping into [`host_calls`] host functions.
+#[derive(Copy, Clone)]
+pub struct HostHooks;
+
+/// Group configuration.
+pub type BandersnatchConfig = ark_ed_on_bls12_381_bandersnatch_ext::BandersnatchConfig<HostHooks>;
+/// Group configuration for Twisted Edwards form (equal to [`BandersnatchConfig`]).
+pub type EdwardsConfig = ark_ed_on_bls12_381_bandersnatch_ext::EdwardsConfig<HostHooks>;
+/// Twisted Edwards form point affine representation.
+pub type EdwardsAffine = ark_ed_on_bls12_381_bandersnatch_ext::EdwardsAffine<HostHooks>;
+/// Twisted Edwards form point projective representation.
+pub type EdwardsProjective = ark_ed_on_bls12_381_bandersnatch_ext::EdwardsProjective<HostHooks>;
+/// Group configuration for Short Weierstrass form (equal to [`BandersnatchConfig`]).
+pub type SWConfig = ark_ed_on_bls12_381_bandersnatch_ext::SWConfig<HostHooks>;
+/// Short Weierstrass form point affine representation.
+pub type SWAffine = ark_ed_on_bls12_381_bandersnatch_ext::SWAffine<HostHooks>;
+/// Short Weierstrass form point projective representation.
+pub type SWProjective = ark_ed_on_bls12_381_bandersnatch_ext::SWProjective<HostHooks>;
+
+impl CurveHooks for HostHooks {
+	fn ed_on_bls12_381_bandersnatch_te_msm(
+		bases: &[EdwardsAffine],
+		scalars: &[<EdwardsConfig as CurveConfig>::ScalarField],
+	) -> Result<EdwardsProjective, ()> {
+		let bases = utils::encode(bases);
+		let scalars = utils::encode(scalars);
+		let res =
+			host_calls::ed_on_bls12_381_bandersnatch_te_msm(bases, scalars).unwrap_or_default();
+		utils::decode_proj_te(res)
+	}
+
+	fn ed_on_bls12_381_bandersnatch_te_mul_projective(
+		base: &EdwardsProjective,
+		scalar: &[u64],
+	) -> Result<EdwardsProjective, ()> {
+		let base = utils::encode_proj_te(base);
+		let scalar = utils::encode(scalar);
+		let res = host_calls::ed_on_bls12_381_bandersnatch_te_mul_projective(base, scalar)
+			.unwrap_or_default();
+		utils::decode_proj_te(res)
+	}
+
+	fn ed_on_bls12_381_bandersnatch_sw_msm(
+		bases: &[SWAffine],
+		scalars: &[<SWConfig as CurveConfig>::ScalarField],
+	) -> Result<SWProjective, ()> {
+		let bases = utils::encode(bases);
+		let scalars = utils::encode(scalars);
+		let res =
+			host_calls::ed_on_bls12_381_bandersnatch_sw_msm(bases, scalars).unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+
+	fn ed_on_bls12_381_bandersnatch_sw_mul_projective(
+		base: &SWProjective,
+		scalar: &[u64],
+	) -> Result<SWProjective, ()> {
+		let base = utils::encode_proj_sw(base);
+		let scalar = utils::encode(scalar);
+		let res = host_calls::ed_on_bls12_381_bandersnatch_sw_mul_projective(base, scalar)
+			.unwrap_or_default();
+		utils::decode_proj_sw(res)
+	}
+}
+
+/// Interfaces for working with *Arkworks* *Ed-on-BLS12-381-Bandersnatch* elliptic curve
+/// related types from within the runtime.
+///
+/// All types are (de-)serialized through the wrapper types from the `ark-scale` trait,
+/// with `ark_scale::{ArkScale, ArkScaleProjective}`.
+///
+/// `ArkScale`'s `Usage` generic parameter is expected to be set to "not-validated"
+/// and "not-compressed".
+#[runtime_interface]
+pub trait HostCalls {
+	/// Twisted Edwards multi scalar multiplication for *Ed-on-BLS12-381-Bandersnatch*.
+	///
+	/// - Receives encoded:
+	///   - `base`: `ArkScaleProjective<EdwardsProjective>`.
+	///   - `scalars`: `ArkScale<Vec<EdwardsConfig::ScalarField>>`.
+	/// - Returns encoded: `ArkScaleProjective<EdwardsProjective>`.
+	fn ed_on_bls12_381_bandersnatch_te_msm(
+		bases: Vec<u8>,
+		scalars: Vec<u8>,
+	) -> Result<Vec<u8>, ()> {
+		utils::msm_te::<ark_ed_on_bls12_381_bandersnatch::EdwardsConfig>(bases, scalars)
+	}
+
+	/// Twisted Edwards projective multiplication for *Ed-on-BLS12-381-Bandersnatch*.
+	///
+	/// - Receives encoded:
+	///   - `base`: `ArkScaleProjective<EdwardsProjective>`.
+	///   - `scalar`: `ArkScale<Vec<u64>>`.
+	/// - Returns encoded: `ArkScaleProjective<EdwardsProjective>`.
+	fn ed_on_bls12_381_bandersnatch_te_mul_projective(
+		base: Vec<u8>,
+		scalar: Vec<u8>,
+	) -> Result<Vec<u8>, ()> {
+		utils::mul_projective_te::<ark_ed_on_bls12_381_bandersnatch::EdwardsConfig>(base, scalar)
+	}
+
+	/// Short Weierstrass multi scalar multiplication for *Ed-on-BLS12-381-Bandersnatch*.
+	///
+	/// - Receives encoded:
+	///   - `bases`: `ArkScale<Vec<SWAffine>>`.
+	///   - `scalars`: `ArkScale<Vec<SWConfig::ScalarField>>`.
+	/// - Returns encoded: `ArkScaleProjective<SWProjective>`.
+	fn ed_on_bls12_381_bandersnatch_sw_msm(
+		bases: Vec<u8>,
+		scalars: Vec<u8>,
+	) -> Result<Vec<u8>, ()> {
+		utils::msm_sw::<ark_ed_on_bls12_381_bandersnatch::SWConfig>(bases, scalars)
+	}
+
+	/// Short Weierstrass projective multiplication for *Ed-on-BLS12-381-Bandersnatch*.
+	///
+	/// - Receives encoded:
+	///   - `base`: `ArkScaleProjective<SWProjective>`.
+	///   - `scalar`: `ArkScale<Vec<u64>>`.
+	/// - Returns encoded: `ArkScaleProjective<SWProjective>`.
+	fn ed_on_bls12_381_bandersnatch_sw_mul_projective(
+		base: Vec<u8>,
+		scalar: Vec<u8>,
+	) -> Result<Vec<u8>, ()> {
+		utils::mul_projective_sw::<ark_ed_on_bls12_381_bandersnatch::SWConfig>(base, scalar)
+	}
+}
diff --git a/substrate/primitives/crypto/ec-utils/src/lib.rs b/substrate/primitives/crypto/ec-utils/src/lib.rs
index c5cc85077391c9165ef192e51ebf1e492b0cffba..e3aea98faa1e78af0421ec9392e1a580c8ef3cb6 100644
--- a/substrate/primitives/crypto/ec-utils/src/lib.rs
+++ b/substrate/primitives/crypto/ec-utils/src/lib.rs
@@ -15,272 +15,39 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-//! Elliptic Curves host functions which may be used to handle some of the *Arkworks*
-//! computationally expensive operations.
+//! Elliptic curves which are mostly compatible with *Arkworks* library
+//! mostly useful in non-native contexts.
+//!
+//! The definitions make use of host functions to offload the non-native
+//! computational environment from the some of the most computationally
+//! expensive operations by internally leveraging the
+//! [arkworks-extensions](https://github.com/paritytech/arkworks-extensions)
+//! library.
+//!
+//! The exported types are organized and named in a way that mirrors the structure
+//! of the types in the original Arkworks library. This design choice aims to make
+//! it easier for users already familiar with the library to understand and utilize
+//! the exported types effectively.
 
 #![warn(missing_docs)]
 #![cfg_attr(not(feature = "std"), no_std)]
 
+#[cfg(feature = "bls12-377")]
+pub mod bls12_377;
+#[cfg(feature = "bls12-381")]
+pub mod bls12_381;
+#[cfg(feature = "bw6-761")]
+pub mod bw6_761;
+#[cfg(feature = "ed-on-bls12-377")]
+pub mod ed_on_bls12_377;
+#[cfg(feature = "ed-on-bls12-381-bandersnatch")]
+pub mod ed_on_bls12_381_bandersnatch;
+
+#[cfg(any(
+	feature = "bls12-377",
+	feature = "bls12-381",
+	feature = "bw6-761",
+	feature = "ed-on-bls12-377",
+	feature = "ed-on-bls12-381-bandersnatch",
+))]
 mod utils;
-
-use sp_runtime_interface::runtime_interface;
-use sp_std::vec::Vec;
-use utils::*;
-
-/// Interfaces for working with *Arkworks* elliptic curves related types from within the runtime.
-///
-/// All types are (de-)serialized through the wrapper types from the `ark-scale` trait,
-/// with `ark_scale::{ArkScale, ArkScaleProjective}`.
-///
-/// `ArkScale`'s `Usage` generic parameter is expected to be set to `HOST_CALL`, which is
-/// a shortcut for "not-validated" and "not-compressed".
-#[runtime_interface]
-pub trait EllipticCurves {
-	/// Pairing multi Miller loop for BLS12-377.
-	///
-	/// - Receives encoded:
-	///   - `a: ArkScale<Vec<ark_ec::bls12::G1Prepared::<ark_bls12_377::Config>>>`.
-	///   - `b: ArkScale<Vec<ark_ec::bls12::G2Prepared::<ark_bls12_377::Config>>>`.
-	/// - Returns encoded: ArkScale<MillerLoopOutput<Bls12<ark_bls12_377::Config>>>.
-	fn bls12_377_multi_miller_loop(a: Vec<u8>, b: Vec<u8>) -> Result<Vec<u8>, ()> {
-		multi_miller_loop::<ark_bls12_377::Bls12_377>(a, b)
-	}
-
-	/// Pairing final exponentiation for BLS12-377.
-	///
-	/// - Receives encoded: `ArkScale<MillerLoopOutput<Bls12<ark_bls12_377::Config>>>`.
-	/// - Returns encoded: `ArkScale<PairingOutput<Bls12<ark_bls12_377::Config>>>`.
-	fn bls12_377_final_exponentiation(f: Vec<u8>) -> Result<Vec<u8>, ()> {
-		final_exponentiation::<ark_bls12_377::Bls12_377>(f)
-	}
-
-	/// Projective multiplication on G1 for BLS12-377.
-	///
-	/// - Receives encoded:
-	///   - `base`: `ArkScaleProjective<ark_bls12_377::G1Projective>`.
-	///   - `scalar`: `ArkScale<&[u64]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bls12_377::G1Projective>`.
-	fn bls12_377_mul_projective_g1(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
-		mul_projective_sw::<ark_bls12_377::g1::Config>(base, scalar)
-	}
-
-	/// Projective multiplication on G2 for BLS12-377.
-	///
-	/// - Receives encoded:
-	///   - `base`: `ArkScaleProjective<ark_bls12_377::G2Projective>`.
-	///   - `scalar`: `ArkScale<&[u64]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bls12_377::G2Projective>`.
-	fn bls12_377_mul_projective_g2(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
-		mul_projective_sw::<ark_bls12_377::g2::Config>(base, scalar)
-	}
-
-	/// Multi scalar multiplication on G1 for BLS12-377.
-	///
-	/// - Receives encoded:
-	///   - `bases`: `ArkScale<&[ark_bls12_377::G1Affine]>`.
-	///   - `scalars`: `ArkScale<&[ark_bls12_377::Fr]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bls12_377::G1Projective>`.
-	fn bls12_377_msm_g1(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
-		msm_sw::<ark_bls12_377::g1::Config>(bases, scalars)
-	}
-
-	/// Multi scalar multiplication on G2 for BLS12-377.
-	///
-	/// - Receives encoded:
-	///   - `bases`: `ArkScale<&[ark_bls12_377::G2Affine]>`.
-	///   - `scalars`: `ArkScale<&[ark_bls12_377::Fr]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bls12_377::G2Projective>`.
-	fn bls12_377_msm_g2(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
-		msm_sw::<ark_bls12_377::g2::Config>(bases, scalars)
-	}
-
-	/// Pairing multi Miller loop for BLS12-381.
-	///
-	/// - Receives encoded:
-	///   - `a`: `ArkScale<Vec<ark_ec::bls12::G1Prepared::<ark_bls12_381::Config>>>`.
-	///   - `b`: `ArkScale<Vec<ark_ec::bls12::G2Prepared::<ark_bls12_381::Config>>>`.
-	/// - Returns encoded: ArkScale<MillerLoopOutput<Bls12<ark_bls12_381::Config>>>
-	fn bls12_381_multi_miller_loop(a: Vec<u8>, b: Vec<u8>) -> Result<Vec<u8>, ()> {
-		multi_miller_loop::<ark_bls12_381::Bls12_381>(a, b)
-	}
-
-	/// Pairing final exponentiation for BLS12-381.
-	///
-	/// - Receives encoded: `ArkScale<MillerLoopOutput<Bls12<ark_bls12_381::Config>>>`.
-	/// - Returns encoded: `ArkScale<PairingOutput<Bls12<ark_bls12_381::Config>>>`.
-	fn bls12_381_final_exponentiation(f: Vec<u8>) -> Result<Vec<u8>, ()> {
-		final_exponentiation::<ark_bls12_381::Bls12_381>(f)
-	}
-
-	/// Projective multiplication on G1 for BLS12-381.
-	///
-	/// - Receives encoded:
-	///   - `base`: `ArkScaleProjective<ark_bls12_381::G1Projective>`.
-	///   - `scalar`: `ArkScale<&[u64]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bls12_381::G1Projective>`.
-	fn bls12_381_mul_projective_g1(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
-		mul_projective_sw::<ark_bls12_381::g1::Config>(base, scalar)
-	}
-
-	/// Projective multiplication on G2 for BLS12-381.
-	///
-	/// - Receives encoded:
-	///   - `base`: `ArkScaleProjective<ark_bls12_381::G2Projective>`.
-	///   - `scalar`: `ArkScale<&[u64]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bls12_381::G2Projective>`.
-	fn bls12_381_mul_projective_g2(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
-		mul_projective_sw::<ark_bls12_381::g2::Config>(base, scalar)
-	}
-
-	/// Multi scalar multiplication on G1 for BLS12-381.
-	///
-	/// - Receives encoded:
-	///   - bases: `ArkScale<&[ark_bls12_381::G1Affine]>`.
-	///   - scalars: `ArkScale<&[ark_bls12_381::Fr]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bls12_381::G1Projective>`.
-	fn bls12_381_msm_g1(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
-		msm_sw::<ark_bls12_381::g1::Config>(bases, scalars)
-	}
-
-	/// Multi scalar multiplication on G2 for BLS12-381.
-	///
-	/// - Receives encoded:
-	///   - `bases`: `ArkScale<&[ark_bls12_381::G2Affine]>`.
-	///   - `scalars`: `ArkScale<&[ark_bls12_381::Fr]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bls12_381::G2Projective>`.
-	fn bls12_381_msm_g2(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
-		msm_sw::<ark_bls12_381::g2::Config>(bases, scalars)
-	}
-
-	/// Pairing multi Miller loop for BW6-761.
-	///
-	/// - Receives encoded:
-	///   - `a`: `ArkScale<Vec<ark_ec::bw6::G1Prepared::<ark_bw6_761::Config>>>`.
-	///   - `b`: `ArkScale<Vec<ark_ec::bw6::G2Prepared::<ark_bw6_761::Config>>>`.
-	/// - Returns encoded: `ArkScale<MillerLoopOutput<Bls12<ark_bw6_761::Config>>>`.
-	fn bw6_761_multi_miller_loop(a: Vec<u8>, b: Vec<u8>) -> Result<Vec<u8>, ()> {
-		multi_miller_loop::<ark_bw6_761::BW6_761>(a, b)
-	}
-
-	/// Pairing final exponentiation for BW6-761.
-	///
-	/// - Receives encoded: `ArkScale<MillerLoopOutput<BW6<ark_bw6_761::Config>>>`.
-	/// - Returns encoded: `ArkScale<PairingOutput<BW6<ark_bw6_761::Config>>>`.
-	fn bw6_761_final_exponentiation(f: Vec<u8>) -> Result<Vec<u8>, ()> {
-		final_exponentiation::<ark_bw6_761::BW6_761>(f)
-	}
-
-	/// Projective multiplication on G1 for BW6-761.
-	///
-	/// - Receives encoded:
-	///   - `base`: `ArkScaleProjective<ark_bw6_761::G1Projective>`.
-	///   - `scalar`: `ArkScale<&[u64]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bw6_761::G1Projective>`.
-	fn bw6_761_mul_projective_g1(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
-		mul_projective_sw::<ark_bw6_761::g1::Config>(base, scalar)
-	}
-
-	/// Projective multiplication on G2 for BW6-761.
-	///
-	/// - Receives encoded:
-	///   - `base`: `ArkScaleProjective<ark_bw6_761::G2Projective>`.
-	///   - `scalar`: `ArkScale<&[u64]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bw6_761::G2Projective>`.
-	fn bw6_761_mul_projective_g2(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
-		mul_projective_sw::<ark_bw6_761::g2::Config>(base, scalar)
-	}
-
-	/// Multi scalar multiplication on G1 for BW6-761.
-	///
-	/// - Receives encoded:
-	///   - `bases`: `ArkScale<&[ark_bw6_761::G1Affine]>`.
-	///   - `scalars`: `ArkScale<&[ark_bw6_761::Fr]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bw6_761::G1Projective>`.
-	fn bw6_761_msm_g1(bases: Vec<u8>, bigints: Vec<u8>) -> Result<Vec<u8>, ()> {
-		msm_sw::<ark_bw6_761::g1::Config>(bases, bigints)
-	}
-
-	/// Multi scalar multiplication on G2 for BW6-761.
-	///
-	/// - Receives encoded:
-	///   - `bases`: `ArkScale<&[ark_bw6_761::G2Affine]>`.
-	///   - `scalars`: `ArkScale<&[ark_bw6_761::Fr]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_bw6_761::G2Projective>`.
-	fn bw6_761_msm_g2(bases: Vec<u8>, bigints: Vec<u8>) -> Result<Vec<u8>, ()> {
-		msm_sw::<ark_bw6_761::g2::Config>(bases, bigints)
-	}
-
-	/// Twisted Edwards projective multiplication for Ed-on-BLS12-377.
-	///
-	/// - Receives encoded:
-	///   - `base`: `ArkScaleProjective<ark_ed_on_bls12_377::EdwardsProjective>`.
-	///   - `scalar`: `ArkScale<&[u64]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_ed_on_bls12_377::EdwardsProjective>`.
-	fn ed_on_bls12_377_mul_projective(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
-		mul_projective_te::<ark_ed_on_bls12_377::EdwardsConfig>(base, scalar)
-	}
-
-	/// Twisted Edwards multi scalar multiplication for Ed-on-BLS12-377.
-	///
-	/// - Receives encoded:
-	///   - `bases`: `ArkScale<&[ark_ed_on_bls12_377::EdwardsAffine]>`.
-	///   - `scalars`: `ArkScale<&[ark_ed_on_bls12_377::Fr]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_ed_on_bls12_377::EdwardsProjective>`.
-	fn ed_on_bls12_377_msm(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
-		msm_te::<ark_ed_on_bls12_377::EdwardsConfig>(bases, scalars)
-	}
-
-	/// Short Weierstrass projective multiplication for Ed-on-BLS12-381-Bandersnatch.
-	///
-	/// - Receives encoded:
-	///   - `base`: `ArkScaleProjective<ark_ed_on_bls12_381_bandersnatch::SWProjective>`.
-	///   - `scalar`: `ArkScale<&[u64]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_ed_on_bls12_381_bandersnatch::SWProjective>`.
-	fn ed_on_bls12_381_bandersnatch_sw_mul_projective(
-		base: Vec<u8>,
-		scalar: Vec<u8>,
-	) -> Result<Vec<u8>, ()> {
-		mul_projective_sw::<ark_ed_on_bls12_381_bandersnatch::SWConfig>(base, scalar)
-	}
-
-	/// Twisted Edwards projective multiplication for Ed-on-BLS12-381-Bandersnatch.
-	///
-	/// - Receives encoded:
-	///   - `base`: `ArkScaleProjective<ark_ed_on_bls12_381_bandersnatch::EdwardsProjective>`.
-	///   - `scalar`: `ArkScale<&[u64]>`.
-	/// - Returns encoded:
-	///   `ArkScaleProjective<ark_ed_on_bls12_381_bandersnatch::EdwardsProjective>`.
-	fn ed_on_bls12_381_bandersnatch_te_mul_projective(
-		base: Vec<u8>,
-		scalar: Vec<u8>,
-	) -> Result<Vec<u8>, ()> {
-		mul_projective_te::<ark_ed_on_bls12_381_bandersnatch::EdwardsConfig>(base, scalar)
-	}
-
-	/// Short Weierstrass multi scalar multiplication for Ed-on-BLS12-381-Bandersnatch.
-	///
-	/// - Receives encoded:
-	///   - `bases`: `ArkScale<&[ark_ed_on_bls12_381_bandersnatch::SWAffine]>`.
-	///   - `scalars`: `ArkScale<&[ark_ed_on_bls12_381_bandersnatch::Fr]>`.
-	/// - Returns encoded: `ArkScaleProjective<ark_ed_on_bls12_381_bandersnatch::SWProjective>`.
-	fn ed_on_bls12_381_bandersnatch_sw_msm(
-		bases: Vec<u8>,
-		scalars: Vec<u8>,
-	) -> Result<Vec<u8>, ()> {
-		msm_sw::<ark_ed_on_bls12_381_bandersnatch::SWConfig>(bases, scalars)
-	}
-
-	/// Twisted Edwards multi scalar multiplication for Ed-on-BLS12-381-Bandersnatch.
-	///
-	/// - Receives encoded:
-	///   - `base`: `ArkScaleProjective<ark_ed_on_bls12_381_bandersnatch::EdwardsProjective>`.
-	///   - `scalars`: `ArkScale<&[ark_ed_on_bls12_381_bandersnatch::Fr]>`.
-	/// - Returns encoded:
-	///   `ArkScaleProjective<ark_ed_on_bls12_381_bandersnatch::EdwardsProjective>`.
-	fn ed_on_bls12_381_bandersnatch_te_msm(
-		bases: Vec<u8>,
-		scalars: Vec<u8>,
-	) -> Result<Vec<u8>, ()> {
-		msm_te::<ark_ed_on_bls12_381_bandersnatch::EdwardsConfig>(bases, scalars)
-	}
-}
diff --git a/substrate/primitives/crypto/ec-utils/src/utils.rs b/substrate/primitives/crypto/ec-utils/src/utils.rs
index 063b8fac7ad3fbee2058480197fbc7df931c5ec4..d0dd8ed8131c4d40b68bdbc0a1f7155318a9c449 100644
--- a/substrate/primitives/crypto/ec-utils/src/utils.rs
+++ b/substrate/primitives/crypto/ec-utils/src/utils.rs
@@ -17,109 +17,100 @@
 
 //! Generic executions of the operations for *Arkworks* elliptic curves.
 
+// As not all functions are used by each elliptic curve and some elliptic
+// curve may be excluded by the build we resort to `#[allow(unused)]` to
+// suppress the expected warning.
+
 use ark_ec::{
-	pairing::{MillerLoopOutput, Pairing, PairingOutput},
-	short_weierstrass,
-	short_weierstrass::SWCurveConfig,
-	twisted_edwards,
-	twisted_edwards::TECurveConfig,
+	pairing::{MillerLoopOutput, Pairing},
+	short_weierstrass::{Affine as SWAffine, Projective as SWProjective, SWCurveConfig},
+	twisted_edwards::{Affine as TEAffine, Projective as TEProjective, TECurveConfig},
 	CurveConfig, VariableBaseMSM,
 };
 use ark_scale::{
-	hazmat::ArkScaleProjective,
+	ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Compress, Validate},
 	scale::{Decode, Encode},
 };
 use sp_std::vec::Vec;
 
-// Scale codec type which is expected to be used by the host functions.
-//
-// Encoding is set to `HOST_CALL` which is a shortcut for "not-validated" and "not-compressed".
-type ArkScale<T> = ark_scale::ArkScale<T, { ark_scale::HOST_CALL }>;
-
-pub fn multi_miller_loop<Curve: Pairing>(g1: Vec<u8>, g2: Vec<u8>) -> Result<Vec<u8>, ()> {
-	let g1 = <ArkScale<Vec<<Curve as Pairing>::G1Affine>> as Decode>::decode(&mut g1.as_slice())
-		.map_err(|_| ())?;
-	let g2 = <ArkScale<Vec<<Curve as Pairing>::G2Affine>> as Decode>::decode(&mut g2.as_slice())
-		.map_err(|_| ())?;
+// SCALE encoding parameters shared by all the enabled modules
+const SCALE_USAGE: u8 = ark_scale::make_usage(Compress::No, Validate::No);
+type ArkScale<T> = ark_scale::ArkScale<T, SCALE_USAGE>;
+type ArkScaleProjective<T> = ark_scale::hazmat::ArkScaleProjective<T>;
 
-	let result = Curve::multi_miller_loop(g1.0, g2.0).0;
-
-	let result: ArkScale<<Curve as Pairing>::TargetField> = result.into();
-	Ok(result.encode())
+#[inline(always)]
+pub fn encode<T: CanonicalSerialize>(val: T) -> Vec<u8> {
+	ArkScale::from(val).encode()
 }
 
-pub fn final_exponentiation<Curve: Pairing>(target: Vec<u8>) -> Result<Vec<u8>, ()> {
-	let target =
-		<ArkScale<<Curve as Pairing>::TargetField> as Decode>::decode(&mut target.as_slice())
-			.map_err(|_| ())?;
-
-	let result = Curve::final_exponentiation(MillerLoopOutput(target.0)).ok_or(())?;
-
-	let result: ArkScale<PairingOutput<Curve>> = result.into();
-	Ok(result.encode())
+#[inline(always)]
+pub fn decode<T: CanonicalDeserialize>(buf: Vec<u8>) -> Result<T, ()> {
+	ArkScale::<T>::decode(&mut &buf[..]).map_err(|_| ()).map(|v| v.0)
 }
 
-pub fn msm_sw<Curve: SWCurveConfig>(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
-	let bases =
-		<ArkScale<Vec<short_weierstrass::Affine<Curve>>> as Decode>::decode(&mut bases.as_slice())
-			.map_err(|_| ())?;
-	let scalars = <ArkScale<Vec<<Curve as CurveConfig>::ScalarField>> as Decode>::decode(
-		&mut scalars.as_slice(),
-	)
-	.map_err(|_| ())?;
-
-	let result =
-		<short_weierstrass::Projective<Curve> as VariableBaseMSM>::msm(&bases.0, &scalars.0)
-			.map_err(|_| ())?;
-
-	let result: ArkScaleProjective<short_weierstrass::Projective<Curve>> = result.into();
-	Ok(result.encode())
+#[inline(always)]
+pub fn encode_proj_sw<T: SWCurveConfig>(val: &SWProjective<T>) -> Vec<u8> {
+	ArkScaleProjective::from(val).encode()
 }
 
-pub fn msm_te<Curve: TECurveConfig>(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
-	let bases =
-		<ArkScale<Vec<twisted_edwards::Affine<Curve>>> as Decode>::decode(&mut bases.as_slice())
-			.map_err(|_| ())?;
-	let scalars = <ArkScale<Vec<<Curve as CurveConfig>::ScalarField>> as Decode>::decode(
-		&mut scalars.as_slice(),
-	)
-	.map_err(|_| ())?;
+#[inline(always)]
+pub fn decode_proj_sw<T: SWCurveConfig>(buf: Vec<u8>) -> Result<SWProjective<T>, ()> {
+	ArkScaleProjective::decode(&mut &buf[..]).map_err(|_| ()).map(|v| v.0)
+}
 
-	let result = <twisted_edwards::Projective<Curve> as VariableBaseMSM>::msm(&bases.0, &scalars.0)
-		.map_err(|_| ())?;
+#[inline(always)]
+pub fn encode_proj_te<T: TECurveConfig>(val: &TEProjective<T>) -> Vec<u8> {
+	ArkScaleProjective::from(val).encode()
+}
 
-	let result: ArkScaleProjective<twisted_edwards::Projective<Curve>> = result.into();
-	Ok(result.encode())
+#[inline(always)]
+pub fn decode_proj_te<T: TECurveConfig>(buf: Vec<u8>) -> Result<TEProjective<T>, ()> {
+	ArkScaleProjective::decode(&mut &buf[..]).map_err(|_| ()).map(|v| v.0)
 }
 
-pub fn mul_projective_sw<Group: SWCurveConfig>(
-	base: Vec<u8>,
-	scalar: Vec<u8>,
-) -> Result<Vec<u8>, ()> {
-	let base = <ArkScaleProjective<short_weierstrass::Projective<Group>> as Decode>::decode(
-		&mut base.as_slice(),
-	)
-	.map_err(|_| ())?;
-	let scalar = <ArkScale<Vec<u64>> as Decode>::decode(&mut scalar.as_slice()).map_err(|_| ())?;
+#[allow(unused)]
+pub fn multi_miller_loop<T: Pairing>(g1: Vec<u8>, g2: Vec<u8>) -> Result<Vec<u8>, ()> {
+	let g1 = decode::<Vec<<T as Pairing>::G1Affine>>(g1)?;
+	let g2 = decode::<Vec<<T as Pairing>::G2Affine>>(g2)?;
+	let res = T::multi_miller_loop(g1, g2);
+	Ok(encode(res.0))
+}
 
-	let result = <Group as SWCurveConfig>::mul_projective(&base.0, &scalar.0);
+#[allow(unused)]
+pub fn final_exponentiation<T: Pairing>(target: Vec<u8>) -> Result<Vec<u8>, ()> {
+	let target = decode::<<T as Pairing>::TargetField>(target)?;
+	let res = T::final_exponentiation(MillerLoopOutput(target)).ok_or(())?;
+	Ok(encode(res.0))
+}
 
-	let result: ArkScaleProjective<short_weierstrass::Projective<Group>> = result.into();
-	Ok(result.encode())
+#[allow(unused)]
+pub fn msm_sw<T: SWCurveConfig>(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
+	let bases = decode::<Vec<SWAffine<T>>>(bases)?;
+	let scalars = decode::<Vec<<T as CurveConfig>::ScalarField>>(scalars)?;
+	let res = <SWProjective<T> as VariableBaseMSM>::msm(&bases, &scalars).map_err(|_| ())?;
+	Ok(encode_proj_sw(&res))
 }
 
-pub fn mul_projective_te<Group: TECurveConfig>(
-	base: Vec<u8>,
-	scalar: Vec<u8>,
-) -> Result<Vec<u8>, ()> {
-	let base = <ArkScaleProjective<twisted_edwards::Projective<Group>> as Decode>::decode(
-		&mut base.as_slice(),
-	)
-	.map_err(|_| ())?;
-	let scalar = <ArkScale<Vec<u64>> as Decode>::decode(&mut scalar.as_slice()).map_err(|_| ())?;
+#[allow(unused)]
+pub fn msm_te<T: TECurveConfig>(bases: Vec<u8>, scalars: Vec<u8>) -> Result<Vec<u8>, ()> {
+	let bases = decode::<Vec<TEAffine<T>>>(bases)?;
+	let scalars = decode::<Vec<<T as CurveConfig>::ScalarField>>(scalars)?;
+	let res = <TEProjective<T> as VariableBaseMSM>::msm(&bases, &scalars).map_err(|_| ())?;
+	Ok(encode_proj_te(&res))
+}
 
-	let result = <Group as TECurveConfig>::mul_projective(&base.0, &scalar.0);
+#[allow(unused)]
+pub fn mul_projective_sw<T: SWCurveConfig>(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
+	let base = decode_proj_sw::<T>(base)?;
+	let scalar = decode::<Vec<u64>>(scalar)?;
+	let res = <T as SWCurveConfig>::mul_projective(&base, &scalar);
+	Ok(encode_proj_sw(&res))
+}
 
-	let result: ArkScaleProjective<twisted_edwards::Projective<Group>> = result.into();
-	Ok(result.encode())
+#[allow(unused)]
+pub fn mul_projective_te<T: TECurveConfig>(base: Vec<u8>, scalar: Vec<u8>) -> Result<Vec<u8>, ()> {
+	let base = decode_proj_te::<T>(base)?;
+	let scalar = decode::<Vec<u64>>(scalar)?;
+	let res = <T as TECurveConfig>::mul_projective(&base, &scalar);
+	Ok(encode_proj_te(&res))
 }