FROST Rerandomized TypeScript Library - v0.2.2-alpha.3
    Preparing search index...

    Interface VartimeMultiscalarMul<C>

    A trait for variable-time multiscalar multiplication without precomputation.

    Implement for a group element.

    interface VartimeMultiscalarMul<C extends Ciphersuite> {
        optionalMultiscalarMul(
            scalars: Scalar<C>[],
            elements: (Element<C> | undefined)[],
        ): Element<C> | undefined;
        vartimeMultiscalarMul(
            scalars: Scalar<C>[],
            elements: Element<C>[],
        ): Element<C>;
    }

    Type Parameters

    Index

    Methods

    • Given an iterator of public scalars and an iterator of Options of group elements, compute either Some(Q), where Q = c_1 * E_1 + ... + c_n * E_n, if all points were Some(E_i), or else return undefined.

      Parameters

      Returns Element<C> | undefined

    • Given an iterator of public scalars and an iterator of public group elements, compute Q = c_1 * E_1 + ... + c_n * E_n, using variable-time operations.

      It is an error to call this function with two iterators of different lengths.

      Parameters

      Returns Element<C>