NTRU-0.1.0.0: NTRU Cryptographic Library

StabilityExperimental
Maintainertlevine@cyberpointllc.com
Safe HaskellNone

NTRU

Description

License : MIT This is an implementation of the NTRU cryptographic system, following the standard set forth by the IEEE in the document entitled IEEE Standard Specification for Public Key Cryptographic Techniques Based on Hard Problems over Lattices. It is designed to be compatible with the implmentation of SecurityInnovations, available here.

Synopsis

Documentation

keyGen112Source

Arguments

:: (Num a, Eq a, Integral a) 
=> IO ([a], [a])

A tuple representing (PublicKey, PrivateKey) where PrivateKey = 1 + pf, per Enhancement #2 at https:www.securityinnovation.comuploadsCrypto/NTRU%20Enhancements%201.pdf

Generates a key-pair with the EES401EP1 Parameter Set

keyGen128 :: (Num a, Eq a, Integral a) => IO ([a], [a])Source

Generates a key-pair with the EES449EP1 Parameter Set

keyGen192 :: (Num a, Eq a, Integral a) => IO ([a], [a])Source

Generates a key-pair with the EES677EP1 Parameter Set

keyGen256 :: (Num a, Eq a, Integral a) => IO ([a], [a])Source

Generates a key-pair with the EES1087EP2 Parameter Set

encrypt112Source

Arguments

:: (Num a, Eq a, Integral a) 
=> [a]

A list of ASCII values representing the message

-> [a]

A list of numbers representing the public key

-> IO [a]

A list of numbers representing the ciphertext

Encrypts a message with the EES401EP1 Parameter Set

encrypt128 :: (Num a, Eq a, Integral a) => [a] -> [a] -> IO [a]Source

Encrypts a message with the EES449EP1 Parameter Set

encrypt192 :: (Num a, Eq a, Integral a) => [a] -> [a] -> IO [a]Source

Encrypts a message with the EES677EP1 Parameter Set

encrypt256 :: (Num a, Eq a, Integral a) => [a] -> [a] -> IO [a]Source

Encrypts a message with the EES1087EP2 Parameter Set

decrypt112Source

Arguments

:: (Num a, Eq a, Integral a) 
=> [a]

A list of numbers representing the private key

-> [a]

A list of numbers representing the public key

-> [a]

A list of numbers representing the ciphertext

-> [a]

A list of numbers representing the original message

Decrypts and verifies a cyphertext with the EES401EP1 Parameter Set

decrypt128 :: (Num a, Eq a, Integral a) => [a] -> [a] -> [a] -> [a]Source

Decrypts and verifies a cyphertext with the EES449EP1 Parameter Set

decrypt192 :: (Num a, Eq a, Integral a) => [a] -> [a] -> [a] -> [a]Source

Decrypts and verifies a cyphertext with the EES677EP1 Parameter Set

decrypt256 :: (Num a, Eq a, Integral a) => [a] -> [a] -> [a] -> [a]Source

Decrypts and verifies a cyphertext with the EES1087EP2 Parameter Set