Maintainer | julrich@cyberpointllc.com |
---|---|
Stability | Experimental |
Safe Haskell | None |
Language | Haskell98 |
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
- keyGen :: ParamSet -> IO ([Integer], [Integer])
- encrypt :: ParamSet -> [Integer] -> [Integer] -> IO [Integer]
- decrypt :: ParamSet -> [Integer] -> [Integer] -> [Integer] -> Maybe [Integer]
- genParams :: String -> ParamSet
- data ParamSet = ParamSet {
- getN :: Int
- getP :: Integer
- getQ :: Integer
- getDf :: Int
- getDg :: Int
- getLLen :: Int
- getDb :: Int
- getMaxMsgLenBytes :: Int
- getBufferLenBits :: Int
- getBufferLenTrits :: Int
- getDm0 :: Int
- getShaLvl :: Int
- getDr :: Int
- getC :: Int
- getMinCallsR :: Integer
- getMinCallsMask :: Int
- getOID :: [Int]
- getPkLen :: Int
- getBitLvl :: Int
Documentation
Arguments
:: ParamSet | Parameter set, most likely the output of |
-> IO ([Integer], [Integer]) | A tuple representing (PublicKey, PrivateKey) where PrivateKey = 1 + pf, per enhancement #2. |
Generates a random PublicKey-PrivateKey Pair
Arguments
:: ParamSet | Parameter set, most likely the output of |
-> [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
Arguments
:: ParamSet | Parameter set, most likely the output of |
-> [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 |
- 3.3 Decrypts e using the private key f and verifies it using the public key h.
Arguments
:: String | Desired parameter set: This should be either one of the 12 listed in the IEEE Standard (1363.1-2008) Annex A |
-> ParamSet |
Generates the proper parameter set based on the given bit level
The Parameter Set Record
Constructors
ParamSet | |
Fields
|