WNafPreCompInfo (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.math.ec

## Class WNafPreCompInfo

- java.lang.Object
- - org.bouncycastle.math.ec.WNafPreCompInfo

- All Implemented Interfaces:
    PreCompInfo

      public class WNafPreCompInfo
      extends java.lang.Object
      implements PreCompInfo

  Class holding precomputation data for the WNAF (Window Non-Adjacent Form) algorithm.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `confWidth`
    `protected ECPoint[]` | `preComp` Array holding the precomputed `ECPoint`s used for a Window NAF multiplication.
    `protected ECPoint[]` | `preCompNeg` Array holding the negations of the precomputed `ECPoint`s used for a Window NAF multiplication.
    `protected ECPoint` | `twice` Holds an `ECPoint` representing twice(this).
    `protected int` | `width`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WNafPreCompInfo()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getConfWidth()`
    `ECPoint[]` | `getPreComp()`
    `ECPoint[]` | `getPreCompNeg()`
    `ECPoint` | `getTwice()`
    `int` | `getWidth()`
    `boolean` | `isPromoted()`
    `void` | `setConfWidth(int confWidth)`
    `void` | `setPreComp(ECPoint[] preComp)`
    `void` | `setPreCompNeg(ECPoint[] preCompNeg)`
    `void` | `setTwice(ECPoint twice)`
    `void` | `setWidth(int width)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### confWidth

          protected int confWidth

    - #### preComp

          protected ECPoint[] preComp

      Array holding the precomputed `ECPoint`s used for a Window NAF multiplication.

    - #### preCompNeg

          protected ECPoint[] preCompNeg

      Array holding the negations of the precomputed `ECPoint`s used for a Window NAF multiplication.

    - #### twice

          protected ECPoint twice

      Holds an `ECPoint` representing twice(this). Used for the Window NAF multiplication to create or extend the precomputed values.

    - #### width

          protected int width

  - ### Constructor Detail

    - #### WNafPreCompInfo

          public WNafPreCompInfo()

  - ### Method Detail

    - #### isPromoted

          public boolean isPromoted()

    - #### getConfWidth

          public int getConfWidth()

    - #### setConfWidth

          public void setConfWidth(int confWidth)

    - #### getPreComp

          public ECPoint[] getPreComp()

    - #### setPreComp

          public void setPreComp(ECPoint[] preComp)

    - #### getPreCompNeg

          public ECPoint[] getPreCompNeg()

    - #### setPreCompNeg

          public void setPreCompNeg(ECPoint[] preCompNeg)

    - #### getTwice

          public ECPoint getTwice()

    - #### setTwice

          public void setTwice(ECPoint twice)

    - #### getWidth

          public int getWidth()

    - #### setWidth

          public void setWidth(int width)