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

    Interface NonAdjacentForm<_C>

    A trait for transforming a scalar generic over a ciphersuite to a non-adjacent form (NAF).

    interface NonAdjacentForm<_C extends Ciphersuite> {
        nonAdjacentForm(w: number): Int8Array;
    }

    Type Parameters

    Index

    Methods

    • Computes a width-(w) "Non-Adjacent Form" of this scalar.

      Thanks to curve25519-dalek for the original implementation that informed this one.

      Safety

      The full scalar field MUST fit in 256 bits in this implementation.

      Parameters

      • w: number

        The window width (must be >= 2 and <= 8)

      Returns Int8Array

      The NAF representation as an array of signed bytes