RSA 2.2.0 → 2.3.0
raw patch · 4 files changed
+7/−23 lines, 4 filesdep −pureMD5PVP ok
version bump matches the API change (PVP)
Dependencies removed: pureMD5
API changes (from Hackage documentation)
- Codec.Crypto.RSA.Exceptions: hashMD5 :: HashInfo
- Codec.Crypto.RSA.Pure: hashMD5 :: HashInfo
Files
- RSA.cabal +1/−3
- Test.hs +2/−5
- src/Codec/Crypto/RSA/Exceptions.hs +2/−5
- src/Codec/Crypto/RSA/Pure.hs +2/−10
RSA.cabal view
@@ -1,6 +1,6 @@ name: RSA category: Cryptography, Codec-version: 2.2.0+version: 2.3.0 license: BSD3 license-file: LICENSE author: Adam Wick <awick@galois.com>@@ -24,7 +24,6 @@ bytestring > 0.8 && < 0.12, crypto-api >= 0.10 && < 0.14, crypto-pubkey-types >= 0.2 && < 0.6,- pureMD5 >= 2.1 && < 2.3, SHA >= 1.6.4.1 && < 2.0 exposed-modules: Codec.Crypto.RSA, Codec.Crypto.RSA.Exceptions,@@ -42,7 +41,6 @@ crypto-api >= 0.10 && < 0.14, crypto-pubkey-types >= 0.4 && < 0.6, DRBG >= 0.5.2 && < 0.7,- pureMD5 >= 2.1 && < 2.3, QuickCheck >= 2.5 && < 3, tagged >= 0.2 && < 0.9, test-framework >= 0.8.0.3 && < 0.10,
Test.hs view
@@ -4,7 +4,6 @@ import qualified Data.ByteString as BSS import Data.ByteString.Lazy(ByteString) import qualified Data.ByteString.Lazy as BS-import qualified Data.Digest.Pure.MD5 as MD5 import Data.Digest.Pure.SHA import System.IO import Test.QuickCheck@@ -81,7 +80,6 @@ instance Show HashInfo where show (HashInfo ident _)- | ident == algorithmIdent hashMD5 = "<MD5>" | ident == algorithmIdent hashSHA1 = "<SHA1>" | ident == algorithmIdent hashSHA224 = "<SHA224>" | ident == algorithmIdent hashSHA256 = "<SHA256>"@@ -90,7 +88,7 @@ | otherwise = "<unknownHASH>" instance Arbitrary HashInfo where- arbitrary = elements [hashMD5, hashSHA1, hashSHA224,+ arbitrary = elements [hashSHA1, hashSHA224, hashSHA256, hashSHA384, hashSHA512] newtype LargePrime = LP Integer@@ -115,8 +113,7 @@ show (HF s _) = "<" ++ s ++ ">" instance Arbitrary HashFun where- arbitrary = elements [HF "MD5" (encode . MD5.md5),- HF "SHA1" (bytestringDigest . sha1),+ arbitrary = elements [HF "SHA1" (bytestringDigest . sha1), HF "SHA256" (bytestringDigest . sha256), HF "SHA384" (bytestringDigest . sha384), HF "SHA512" (bytestringDigest . sha512)]
src/Codec/Crypto/RSA/Exceptions.hs view
@@ -27,7 +27,7 @@ , rsassa_pkcs1_v1_5_sign , rsassa_pkcs1_v1_5_verify -- * Hashing algorithm declarations for use in RSA functions- , hashMD5, hashSHA1+ , hashSHA1 , hashSHA224, hashSHA256, hashSHA384, hashSHA512 -- * Other mathematical functions that are handy for implementing -- other RSA primitives.@@ -259,7 +259,7 @@ -- or 35. -- -- Thus,--- * for MD5, SHA1, and SHA256, use 512+ bit keys+-- * for SHA1 and SHA256, use 512+ bit keys -- * for SHA384 and SHA512, use 1024+ bit keys -- rsassa_pkcs1_v1_5_sign :: HashInfo {- ^The hash function to use -} ->@@ -358,9 +358,6 @@ modular_inverse = Pure.modular_inverse -- ------------------------------------------------------------------------------hashMD5 :: HashInfo-hashMD5 = Pure.hashMD5 hashSHA1 :: HashInfo hashSHA1 = Pure.hashSHA1
src/Codec/Crypto/RSA/Pure.hs view
@@ -29,7 +29,7 @@ , rsassa_pkcs1_v1_5_sign , rsassa_pkcs1_v1_5_verify -- * Hashing algorithm declarations for use in RSA functions- , hashMD5, hashSHA1+ , hashSHA1 , hashSHA224, hashSHA256, hashSHA384, hashSHA512 -- * Other mathematical functions that are handy for implementing -- other RSA primitives.@@ -56,7 +56,6 @@ import Data.Bits import Data.ByteString.Lazy(ByteString) import qualified Data.ByteString.Lazy as BS-import qualified Data.Digest.Pure.MD5 as MD5 import Data.Digest.Pure.SHA import Data.Int import Data.Typeable@@ -449,7 +448,7 @@ -- or 35. -- -- Thus,--- * for MD5, SHA1, and SHA256, use 512+ bit keys+-- * for SHA1 and SHA256, use 512+ bit keys -- * for SHA384 and SHA512, use 1024+ bit keys -- rsassa_pkcs1_v1_5_sign :: HashInfo {- ^The hash function to use -} ->@@ -747,13 +746,6 @@ in (g, x - ((b `div` a) * y), y) -- ------------------------------------------------------------------------------hashMD5 :: HashInfo-hashMD5 = HashInfo {- algorithmIdent = BS.pack [0x30,0x20,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,- 0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x04,0x10]- , hashFunction = encode . MD5.md5- } hashSHA1 :: HashInfo hashSHA1 = HashInfo {