Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.ntru
Class NtruEncrypt

    java.lang.Object
      net.sf.ntru.NtruEncrypt

    public class NtruEncrypt

extends java.lang.Object

The parameter p is hardcoded to 3.

Constructor Summary
`NtruEncrypt()`

Method Summary
`static byte[]` | `decrypt(byte[] data, EncryptionKeyPair kp, EncryptionParameters params)`
`(package private) static IntegerPolynomial` | `decrypt(IntegerPolynomial e, IntegerPolynomial privKey, EncryptionParameters params)`
`static byte[]` | `encrypt(byte[] m, EncryptionPublicKey pubKey, EncryptionParameters params)`
`(package private) static IntegerPolynomial` | `encrypt(IntegerPolynomial m, IntegerPolynomial r, IntegerPolynomial pubKey, EncryptionParameters params)`
`private static IntegerPolynomial` | `generateBlindingPoly(byte[] seed, byte[] M, EncryptionParameters params)`
`static EncryptionKeyPair` | `generateKeyPair(EncryptionParameters params)`
`private static IntegerPolynomial` | `MGF1(byte[] input, int N, int minCallsMask)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NtruEncrypt

    public NtruEncrypt()

Method Detail

### generateKeyPair

    public static EncryptionKeyPair generateKeyPair(EncryptionParameters params)

### encrypt

    public static byte[] encrypt(byte[] m,
                                 EncryptionPublicKey pubKey,
                                 EncryptionParameters params)
                          throws java.security.NoSuchAlgorithmException

  Parameters:
    `m` - The message to encrypt
    `pubKey` -
    `params` -
  Returns:
  Throws:
    `java.security.NoSuchAlgorithmException`

### encrypt

    static IntegerPolynomial encrypt(IntegerPolynomial m,
                                     IntegerPolynomial r,
                                     IntegerPolynomial pubKey,
                                     EncryptionParameters params)

### generateBlindingPoly

    private static IntegerPolynomial generateBlindingPoly(byte[] seed,
                                                          byte[] M,
                                                          EncryptionParameters params)
                                                   throws java.security.NoSuchAlgorithmException

  Throws:
    `java.security.NoSuchAlgorithmException`

### MGF1

    private static IntegerPolynomial MGF1(byte[] input,
                                          int N,
                                          int minCallsMask)
                                   throws java.security.NoSuchAlgorithmException

  Throws:
    `java.security.NoSuchAlgorithmException`

### decrypt

    public static byte[] decrypt(byte[] data,
                                 EncryptionKeyPair kp,
                                 EncryptionParameters params)
                          throws java.security.NoSuchAlgorithmException

  Throws:
    `java.security.NoSuchAlgorithmException`

### decrypt

    static IntegerPolynomial decrypt(IntegerPolynomial e,
                                     IntegerPolynomial privKey,
                                     EncryptionParameters params)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD