NTRU-1.1.0.0: NTRU Cryptography

Maintainerjulrich@cyberpointllc.com
StabilityExperimental
Safe HaskellNone
LanguageHaskell98

Math.NTRU

Description

License : GPL

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 (IEEE Std 1363.1-2008). It is designed to be compatible with the implementation of SecurityInnovations, available here.

Synopsis

Documentation

keyGen Source #

Arguments

:: ParamSet

Parameter set, most likely the output of genParams

-> IO ([Integer], [Integer])

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

Generates a random PublicKey-PrivateKey Pair

encrypt Source #

Arguments

:: ParamSet

Parameter set, most likely the output of genParams

-> [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 using the given parameter set

decrypt Source #

Arguments

:: ParamSet

Parameter set, most likely the output of genParams

-> [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

  1. 3.3 Decrypts e using the private key f and verifies it using the public key h.

genParams Source #

Arguments

:: String

Desired parameter set: This should be either one of the 12 listed in the IEEE Standard (1363.1-2008) Annex A

-> ParamSet

Parameter set to be used by keyGen, encrypt, or decrypt

Generates the proper parameter set based on the given bit level

data ParamSet Source #

The Parameter Set Record

Constructors

ParamSet 

Fields

Instances
Show ParamSet Source # 
Instance details

Defined in Math.NTRU