Package org.bouncycastle.pqc.crypto.ntru

## Class NTRUSigner

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

-     public class NTRUSigner
      extends java.lang.Object

  Deprecated.
  the NTRUSigner algorithm was broken in 2012 by Ducas and Nguyen. See https://www.di.ens.fr/~ducas/NTRUSign_Cryptanalysis/DucasNguyen_Learning.pdf for details.
  Signs, verifies data and generates key pairs.

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | 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.