ModExpAlgorithm

Trait ModExpAlgorithm 

Source
pub trait ModExpAlgorithm: 'static {
    // Required method
    fn modexp(base: &[u8], exp: &[u8], modulus: &[u8]) -> Vec<u8> ;
}
Expand description

Trait providing the interface for the modexp function. The implementation provided by this crate is AuroraModExp below, but other users of Aurora Engine may wish to select a different implementation.

Required Methods§

Source

fn modexp(base: &[u8], exp: &[u8], modulus: &[u8]) -> Vec<u8>

Computes (base ^ exp) % modulus, where all values are given as big-endian encoded bytes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§