NTRUSigner (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.pqc.crypto.ntru

## Class NTRUSigner

- java.lang.Object
- - org.bouncycastle.pqc.crypto.ntru.NTRUSigner

- Deprecated.
  the NTRUSigner algorithm was broken in 2012 by Ducas and Nguyen. See http://www.di.ens.fr/~ducas/NTRUSign_Cryptanalysis/DucasNguyen_Learning.pdf for details.

      public class NTRUSigner
      extends java.lang.Object

  Signs, verifies data and generates key pairs.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NTRUSigner(NTRUSigningParameters params)` Deprecated. Constructs a new instance with a set of signature parameters.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected IntegerPolynomial` | `createMsgRep(byte[] msgHash, int r)` Deprecated.
    `byte[]` | `generateSignature()` Deprecated. Adds data to sign and computes a signature over this data and any data previously added via `update(byte[], int, int)`.
    `void` | `init(boolean forSigning, CipherParameters params)` Deprecated. Resets the engine for signing a message.
    `void` | `update(byte b)` Deprecated. Adds data to sign or verify.
    `void` | `update(byte[] m, int off, int length)` Deprecated. Adds data to sign or verify.
    `boolean` | `verifySignature(byte[] sig)` Deprecated. Verifies a signature for any data previously added via `update(byte[], int, int)`.

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

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

- - ### Constructor Detail

    - #### NTRUSigner

          public NTRUSigner(NTRUSigningParameters params)

      Deprecated.
      Constructs a new instance with a set of signature parameters.
      Parameters:
        `params` - signature parameters

  - ### Method Detail

    - #### init

          public void init(boolean forSigning,
                  CipherParameters params)

      Deprecated.
      Resets the engine for signing a message.
      Parameters:
        `forSigning` -
        `params` -

    - #### update

          public void update(byte b)

      Deprecated.
      Adds data to sign or verify.
      Parameters:
        `b` - data

    - #### update

          public void update(byte[] m,
                    int off,
                    int length)

      Deprecated.
      Adds data to sign or verify.
      Parameters:
        `m` - data
        `off` - offset
        `length` - number of bytes

    - #### generateSignature

          public byte[] generateSignature()

      Deprecated.
      Adds data to sign and computes a signature over this data and any data previously added via `update(byte[], int, int)`.
      Returns:
        a signature
      Throws:
        `java.lang.IllegalStateException` - if `initSign` was not called

    - #### verifySignature

          public boolean verifySignature(byte[] sig)

      Deprecated.
      Verifies a signature for any data previously added via `update(byte[], int, int)`.
      Parameters:
        `sig` - a signature
      Returns:
        whether the signature is valid
      Throws:
        `java.lang.IllegalStateException` - if `initVerify` was not called

    - #### createMsgRep

          protected IntegerPolynomial createMsgRep(byte[] msgHash,
                                       int r)

      Deprecated.