Stability | Experimental |
---|---|
Maintainer | julrich@cyberpointllc.com |
Safe Haskell | None |
License : New BSD
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.
- 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
:: 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
:: 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
:: 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.
:: 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
ParamSet | |
|