Skip to main content

ElementExt

Trait ElementExt 

Source
pub trait ElementExt: Element {
    const MAX_TABLE_BITS: u32 = 16;

    // Provided methods
    fn multiexp(identity: &Self, pairs: &[(&Table<Self>, &[u8])]) -> Self { ... }
    fn mul(table: &Table<Self>, scalar: &[u8]) -> Self { ... }
}
Available on crate feature alloc only.
Expand description

TODO

Provided Associated Constants§

Source

const MAX_TABLE_BITS: u32 = 16

The maximum amount of bits to create a table with.

This allows backends which won’t use larger tables to prevent redundant creation of such large tables;

Provided Methods§

Source

fn multiexp(identity: &Self, pairs: &[(&Table<Self>, &[u8])]) -> Self

Perform a multiexponentation.

The implementation provided by this trait runs in variable time.

Source

fn mul(table: &Table<Self>, scalar: &[u8]) -> Self

Perform a multiplication with a Table.

The scalar is expected to be represented by its big-endian bytes.

The implementation provided by this trait is as-constant-time as multiexp is.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§