NTRU-1.1.0.0: NTRU Cryptography

Safe HaskellNone
LanguageHaskell98

Math.NTRU.EES677EP1

Description

NTRU cryptographic system using the EES677EP1 parameter set, for use at the 192-bit security level.

Synopsis

Documentation

keyGen Source #

Arguments

:: IO ([Integer], [Integer])

A tuple representing (PublicKey, PrivateKey) where PrivateKey = 1 + pf, per enahncement#2.

Generates a random PublicKey-PrivateKey pair

encrypt Source #

Arguments

:: [Integer]

A list of ASCII values representing the message

-> [Integer]

A list of numbers representing the public key

-> IO [Integer]

A list of numbers representing the ciphertext

Encrypts a message with the given public key

decrypt Source #

Arguments

:: [Integer]

A list of numbers representing the private key

-> [Integer]

A list of numbers representing the public key

-> [Integer]

A list of numbers representing the ciphertext

-> Maybe [Integer]

A list of numbers representing the original message, or nothing on failure

Decrypts and verifies a cyphertext with the given keys