Merge pull request #262 from ocheron/rsapss-any-length

RSA-PSS with arbitrary key size
This commit is contained in:
Olivier Chéron 2019-01-19 08:49:38 +01:00
commit f81c08c089
2 changed files with 199 additions and 315 deletions

View File

@ -26,11 +26,12 @@ import Crypto.PubKey.RSA.Prim
import Crypto.PubKey.RSA (generateBlinder) import Crypto.PubKey.RSA (generateBlinder)
import Crypto.PubKey.MaskGenFunction import Crypto.PubKey.MaskGenFunction
import Crypto.Hash import Crypto.Hash
import Crypto.Number.Basic (numBits)
import Data.Bits (xor, shiftR, (.&.)) import Data.Bits (xor, shiftR, (.&.))
import Data.Word import Data.Word
import Crypto.Internal.ByteArray (ByteArrayAccess, ByteArray) import Crypto.Internal.ByteArray (ByteArrayAccess, ByteArray)
import qualified Crypto.Internal.ByteArray as B (convert) import qualified Crypto.Internal.ByteArray as B (convert, eq)
import Data.ByteString (ByteString) import Data.ByteString (ByteString)
import qualified Data.ByteString as B import qualified Data.ByteString as B
@ -69,18 +70,19 @@ signDigestWithSalt :: HashAlgorithm hash
-> Digest hash -- ^ Message digest -> Digest hash -- ^ Message digest
-> Either Error ByteString -> Either Error ByteString
signDigestWithSalt salt blinder params pk digest signDigestWithSalt salt blinder params pk digest
| k < hashLen + saltLen + 2 = Left InvalidParameters | emLen < hashLen + saltLen + 2 = Left InvalidParameters
| otherwise = Right $ dp blinder pk em | otherwise = Right $ dp blinder pk em
where k = private_size pk where k = private_size pk
emLen = if emTruncate pubBits then k - 1 else k
mHash = B.convert digest mHash = B.convert digest
dbLen = k - hashLen - 1 dbLen = emLen - hashLen - 1
saltLen = B.length salt saltLen = B.length salt
hashLen = hashDigestSize (pssHash params) hashLen = hashDigestSize (pssHash params)
pubBits = private_size pk * 8 -- to change if public_size is converted in bytes pubBits = numBits (private_n pk)
m' = B.concat [B.replicate 8 0,mHash,salt] m' = B.concat [B.replicate 8 0,mHash,salt]
h = B.convert $ hashWith (pssHash params) m' h = B.convert $ hashWith (pssHash params) m'
db = B.concat [B.replicate (dbLen - saltLen - 1) 0,B.singleton 1,salt] db = B.concat [B.replicate (dbLen - saltLen - 1) 0,B.singleton 1,salt]
dbmask = (pssMaskGenAlg params) h dbLen dbmask = pssMaskGenAlg params h dbLen
maskedDB = B.pack $ normalizeToKeySize pubBits $ B.zipWith xor db dbmask maskedDB = B.pack $ normalizeToKeySize pubBits $ B.zipWith xor db dbmask
em = B.concat [maskedDB, h, B.singleton (pssTrailerField params)] em = B.concat [maskedDB, h, B.singleton (pssTrailerField params)]
@ -148,7 +150,7 @@ verify :: HashAlgorithm hash
-> ByteString -- ^ Message to verify -> ByteString -- ^ Message to verify
-> ByteString -- ^ Signature -> ByteString -- ^ Signature
-> Bool -> Bool
verify params pk m s = verifyDigest params pk mHash s verify params pk m = verifyDigest params pk mHash
where mHash = hashWith (pssHash params) m where mHash = hashWith (pssHash params) m
-- | Verify a signature using the PSS Parameters -- | Verify a signature using the PSS Parameters
@ -161,30 +163,37 @@ verifyDigest :: HashAlgorithm hash
-> ByteString -- ^ Signature -> ByteString -- ^ Signature
-> Bool -> Bool
verifyDigest params pk digest s verifyDigest params pk digest s
| public_size pk /= B.length s = False | B.length s /= k = False
| B.any (/= 0) pre = False
| B.last em /= pssTrailerField params = False | B.last em /= pssTrailerField params = False
| not (B.all (== 0) ps0) = False | B.any (/= 0) ps0 = False
| b1 /= B.singleton 1 = False | b1 /= B.singleton 1 = False
| otherwise = h == B.convert h' | otherwise = B.eq h h'
where -- parameters where -- parameters
hashLen = hashDigestSize (pssHash params) hashLen = hashDigestSize (pssHash params)
mHash = B.convert digest mHash = B.convert digest
dbLen = public_size pk - hashLen - 1 k = public_size pk
pubBits = public_size pk * 8 -- to change if public_size is converted in bytes emLen = if emTruncate pubBits then k - 1 else k
dbLen = emLen - hashLen - 1
pubBits = numBits (public_n pk)
-- unmarshall fields -- unmarshall fields
em = ep pk s (pre, em) = B.splitAt (k - emLen) (ep pk s) -- drop 0..1 byte
maskedDB = B.take (B.length em - hashLen - 1) em maskedDB = B.take dbLen em
h = B.take hashLen $ B.drop (B.length maskedDB) em h = B.take hashLen $ B.drop (B.length maskedDB) em
dbmask = (pssMaskGenAlg params) h dbLen dbmask = pssMaskGenAlg params h dbLen
db = B.pack $ normalizeToKeySize pubBits $ B.zipWith xor maskedDB dbmask db = B.pack $ normalizeToKeySize pubBits $ B.zipWith xor maskedDB dbmask
(ps0,z) = B.break (== 1) db (ps0,z) = B.break (== 1) db
(b1,salt) = B.splitAt 1 z (b1,salt) = B.splitAt 1 z
m' = B.concat [B.replicate 8 0,mHash,salt] m' = B.concat [B.replicate 8 0,mHash,salt]
h' = hashWith (pssHash params) m' h' = hashWith (pssHash params) m'
-- When the modulus has bit length 1 modulo 8 we drop the first byte.
emTruncate :: Int -> Bool
emTruncate bits = ((bits-1) .&. 0x7) == 0
normalizeToKeySize :: Int -> [Word8] -> [Word8] normalizeToKeySize :: Int -> [Word8] -> [Word8]
normalizeToKeySize _ [] = [] -- very unlikely normalizeToKeySize _ [] = [] -- very unlikely
normalizeToKeySize bits (x:xs) = x .&. mask : xs normalizeToKeySize bits (x:xs) = x .&. mask : xs
where mask = if sh > 0 then 0xff `shiftR` (8-sh) else 0xff where mask = if sh > 0 then 0xff `shiftR` (8-sh) else 0xff
sh = ((bits-1) .&. 0x7) sh = (bits-1) .&. 0x7

View File

@ -6,6 +6,9 @@ import qualified Crypto.PubKey.RSA.PSS as PSS
import Imports import Imports
-- Module contains one vector generated by the implementation itself and other
-- vectors from <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
data VectorPSS = VectorPSS { message :: ByteString data VectorPSS = VectorPSS { message :: ByteString
, salt :: ByteString , salt :: ByteString
, signature :: ByteString , signature :: ByteString
@ -149,313 +152,179 @@ vectorsKey1 =
} }
] ]
{- -- ==================================
# =================================== -- Example 2: A 1025-bit RSA Key Pair
# Example 10: A 2048-bit RSA Key Pair -- ==================================
# ===================================
# ------------------------------ rsaKey2 = PrivateKey
# Components of the RSA Key Pair { private_pub = PublicKey
# ------------------------------ { public_n = 0x01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9
, public_e = 0x010001
, public_size = 129
}
, private_d = 0x027d147e4673057377fd1ea201565772176a7dc38358d376045685a2e787c23c15576bc16b9f444402d6bfc5d98a3e88ea13ef67c353eca0c0ddba9255bd7b8bb50a644afdfd1dd51695b252d22e7318d1b6687a1c10ff75545f3db0fe602d5f2b7f294e3601eab7b9d1cecd767f64692e3e536ca2846cb0c2dd486a39fa75b1
, private_p = 0x016601e926a0f8c9e26ecab769ea65a5e7c52cc9e080ef519457c644da6891c5a104d3ea7955929a22e7c68a7af9fcad777c3ccc2b9e3d3650bce404399b7e59d1
, private_q = 0x014eafa1d4d0184da7e31f877d1281ddda625664869e8379e67ad3b75eae74a580e9827abd6eb7a002cb5411f5266797768fb8e95ae40e3e8a01f35ff89e56c079
, private_dP = 0xe247cce504939b8f0a36090de200938755e2444b29539a7da7a902f6056835c0db7b52559497cfe2c61a8086d0213c472c78851800b171f6401de2e9c2756f31
, private_dQ = 0xb12fba757855e586e46f64c38a70c68b3f548d93d787b399999d4c8f0bbd2581c21e19ed0018a6d5d3df86424b3abcad40199d31495b61309f27c1bf55d487c1
, private_qinv = 0x564b1e1fa003bda91e89090425aac05b91da9ee25061e7628d5f51304a84992fdc33762bd378a59f030a334d532bd0dae8f298ea9ed844636ad5fb8cbdc03cad
}
# RSA modulus n: vectorsKey2 =
a5 dd 86 7a c4 cb 02 f9 0b 94 57 d4 8c 14 a7 70 [
ef 99 1c 56 c3 9c 0e c6 5f d1 1a fa 89 37 ce a5 -- Example 2.1
7b 9b e7 ac 73 b4 5c 00 17 61 5b 82 d6 22 e3 18 VectorPSS
75 3b 60 27 c0 fd 15 7b e1 2f 80 90 fe e2 a7 ad { message = "\xda\xba\x03\x20\x66\x26\x3f\xae\xdb\x65\x98\x48\x11\x52\x78\xa5\x2c\x44\xfa\xa3\xa7\x6f\x37\x51\x5e\xd3\x36\x32\x10\x72\xc4\x0a\x9d\x9b\x53\xbc\x05\x01\x40\x78\xad\xf5\x20\x87\x51\x46\xaa\xe7\x0f\xf0\x60\x22\x6d\xcb\x7b\x1f\x1f\xc2\x7e\x93\x60"
cd 0e ef 75 9f 88 ba 49 97 c7 a4 2d 58 c9 aa 12 , salt = "\x57\xbf\x16\x0b\xcb\x02\xbb\x1d\xc7\x28\x0c\xf0\x45\x85\x30\xb7\xd2\x83\x2f\xf7"
cb 99 ae 00 1f e5 21 c1 3b b5 43 14 45 a8 d5 ae , signature = "\x01\x4c\x5b\xa5\x33\x83\x28\xcc\xc6\xe7\xa9\x0b\xf1\xc0\xab\x3f\xd6\x06\xff\x47\x96\xd3\xc1\x2e\x4b\x63\x9e\xd9\x13\x6a\x5f\xec\x6c\x16\xd8\x88\x4b\xdd\x99\xcf\xdc\x52\x14\x56\xb0\x74\x2b\x73\x68\x68\xcf\x90\xde\x09\x9a\xdb\x8d\x5f\xfd\x1d\xef\xf3\x9b\xa4\x00\x7a\xb7\x46\xce\xfd\xb2\x2d\x7d\xf0\xe2\x25\xf5\x46\x27\xdc\x65\x46\x61\x31\x72\x1b\x90\xaf\x44\x53\x63\xa8\x35\x8b\x9f\x60\x76\x42\xf7\x8f\xab\x0a\xb0\xf4\x3b\x71\x68\xd6\x4b\xae\x70\xd8\x82\x78\x48\xd8\xef\x1e\x42\x1c\x57\x54\xdd\xf4\x2c\x25\x89\xb5\xb3"
4f 5e 4c 7e 94 8a c2 27 d3 60 40 71 f2 0e 57 7e }
90 5f be b1 5d fa f0 6d 1d e5 ae 62 53 d6 3a 6a -- Example 2.2
21 20 b3 1a 5d a5 da bc 95 50 60 0e 20 f2 7d 37 , VectorPSS
39 e2 62 79 25 fe a3 cc 50 9f 21 df f0 4e 6e ea { message = "\xe4\xf8\x60\x1a\x8a\x6d\xa1\xbe\x34\x44\x7c\x09\x59\xc0\x58\x57\x0c\x36\x68\xcf\xd5\x1d\xd5\xf9\xcc\xd6\xad\x44\x11\xfe\x82\x13\x48\x6d\x78\xa6\xc4\x9f\x93\xef\xc2\xca\x22\x88\xce\xbc\x2b\x9b\x60\xbd\x04\xb1\xe2\x20\xd8\x6e\x3d\x48\x48\xd7\x09\xd0\x32\xd1\xe8\xc6\xa0\x70\xc6\xaf\x9a\x49\x9f\xcf\x95\x35\x4b\x14\xba\x61\x27\xc7\x39\xde\x1b\xb0\xfd\x16\x43\x1e\x46\x93\x8a\xec\x0c\xf8\xad\x9e\xb7\x2e\x83\x2a\x70\x35\xde\x9b\x78\x07\xbd\xc0\xed\x8b\x68\xeb\x0f\x5a\xc2\x21\x6b\xe4\x0c\xe9\x20\xc0\xdb\x0e\xdd\xd3\x86\x0e\xd7\x88\xef\xac\xca\xca\x50\x2d\x8f\x2b\xd6\xd1\xa7\xc1\xf4\x1f\xf4\x6f\x16\x81\xc8\xf1\xf8\x18\xe9\xc4\xf6\xd9\x1a\x0c\x78\x03\xcc\xc6\x3d\x76\xa6\x54\x4d\x84\x3e\x08\x4e\x36\x3b\x8a\xcc\x55\xaa\x53\x17\x33\xed\xb5\xde\xe5\xb5\x19\x6e\x9f\x03\xe8\xb7\x31\xb3\x77\x64\x28\xd9\xe4\x57\xfe\x3f\xbc\xb3\xdb\x72\x74\x44\x2d\x78\x58\x90\xe9\xcb\x08\x54\xb6\x44\x4d\xac\xe7\x91\xd7\x27\x3d\xe1\x88\x97\x19\x33\x8a\x77\xfe"
45 49 c5 40 d6 80 9f f9 30 7e ed e9 1f ff 58 73 , salt = "\x7f\x6d\xd3\x59\xe6\x04\xe6\x08\x70\xe8\x98\xe4\x7b\x19\xbf\x2e\x5a\x7b\x2a\x90"
3d 83 85 a2 37 d6 d3 70 5a 33 e3 91 90 09 92 07 , signature = "\x01\x09\x91\x65\x6c\xca\x18\x2b\x7f\x29\xd2\xdb\xc0\x07\xe7\xae\x0f\xec\x15\x8e\xb6\x75\x9c\xb9\xc4\x5c\x5f\xf8\x7c\x76\x35\xdd\x46\xd1\x50\x88\x2f\x4d\xe1\xe9\xae\x65\xe7\xf7\xd9\x01\x8f\x68\x36\x95\x4a\x47\xc0\xa8\x1a\x8a\x6b\x6f\x83\xf2\x94\x4d\x60\x81\xb1\xaa\x7c\x75\x9b\x25\x4b\x2c\x34\xb6\x91\xda\x67\xcc\x02\x26\xe2\x0b\x2f\x18\xb4\x22\x12\x76\x1d\xcd\x4b\x90\x8a\x62\xb3\x71\xb5\x91\x8c\x57\x42\xaf\x4b\x53\x7e\x29\x69\x17\x67\x4f\xb9\x14\x19\x47\x61\x62\x1c\xc1\x9a\x41\xf6\xfb\x95\x3f\xbc\xbb\x64\x9d\xea"
0d f7 ad f1 35 7c f7 e3 70 0c e3 66 7d e8 3f 17 }
b8 df 17 78 db 38 1d ce 09 cb 4a d0 58 a5 11 00 -- Example 2.3
1a 73 81 98 ee 27 cf 55 a1 3b 75 45 39 90 65 82 , VectorPSS
ec 8b 17 4b d5 8d 5d 1f 3d 76 7c 61 37 21 ae 05 { message = "\x52\xa1\xd9\x6c\x8a\xc3\x9e\x41\xe4\x55\x80\x98\x01\xb9\x27\xa5\xb4\x45\xc1\x0d\x90\x2a\x0d\xcd\x38\x50\xd2\x2a\x66\xd2\xbb\x07\x03\xe6\x7d\x58\x67\x11\x45\x95\xaa\xbf\x5a\x7a\xeb\x5a\x8f\x87\x03\x4b\xbb\x30\xe1\x3c\xfd\x48\x17\xa9\xbe\x76\x23\x00\x23\x60\x6d\x02\x86\xa3\xfa\xf8\xa4\xd2\x2b\x72\x8e\xc5\x18\x07\x9f\x9e\x64\x52\x6e\x3a\x0c\xc7\x94\x1a\xa3\x38\xc4\x37\x99\x7c\x68\x0c\xca\xc6\x7c\x66\xbf\xa1"
, salt = "\xfc\xa8\x62\x06\x8b\xce\x22\x46\x72\x4b\x70\x8a\x05\x19\xda\x17\xe6\x48\x68\x8c"
, signature = "\x00\x7f\x00\x30\x01\x8f\x53\xcd\xc7\x1f\x23\xd0\x36\x59\xfd\xe5\x4d\x42\x41\xf7\x58\xa7\x50\xb4\x2f\x18\x5f\x87\x57\x85\x20\xc3\x07\x42\xaf\xd8\x43\x59\xb6\xe6\xe8\xd3\xed\x95\x9d\xc6\xfe\x48\x6b\xed\xc8\xe2\xcf\x00\x1f\x63\xa7\xab\xe1\x62\x56\xa1\xb8\x4d\xf0\xd2\x49\xfc\x05\xd3\x19\x4c\xe5\xf0\x91\x27\x42\xdb\xbf\x80\xdd\x17\x4f\x6c\x51\xf6\xba\xd7\xf1\x6c\xf3\x36\x4e\xba\x09\x5a\x06\x26\x7d\xc3\x79\x38\x03\xac\x75\x26\xae\xbe\x0a\x47\x5d\x38\xb8\xc2\x24\x7a\xb5\x1c\x48\x98\xdf\x70\x47\xdc\x6a\xdf\x52\xc6\xc4"
}
-- Example 2.4
, VectorPSS
{ message = "\xa7\x18\x2c\x83\xac\x18\xbe\x65\x70\xa1\x06\xaa\x9d\x5c\x4e\x3d\xbb\xd4\xaf\xae\xb0\xc6\x0c\x4a\x23\xe1\x96\x9d\x79\xff"
, salt = "\x80\x70\xef\x2d\xe9\x45\xc0\x23\x87\x68\x4b\xa0\xd3\x30\x96\x73\x22\x35\xd4\x40"
, signature = "\x00\x9c\xd2\xf4\xed\xbe\x23\xe1\x23\x46\xae\x8c\x76\xdd\x9a\xd3\x23\x0a\x62\x07\x61\x41\xf1\x6c\x15\x2b\xa1\x85\x13\xa4\x8e\xf6\xf0\x10\xe0\xe3\x7f\xd3\xdf\x10\xa1\xec\x62\x9a\x0c\xb5\xa3\xb5\xd2\x89\x30\x07\x29\x8c\x30\x93\x6a\x95\x90\x3b\x6b\xa8\x55\x55\xd9\xec\x36\x73\xa0\x61\x08\xfd\x62\xa2\xfd\xa5\x6d\x1c\xe2\xe8\x5c\x4d\xb6\xb2\x4a\x81\xca\x3b\x49\x6c\x36\xd4\xfd\x06\xeb\x7c\x91\x66\xd8\xe9\x48\x77\xc4\x2b\xea\x62\x2b\x3b\xfe\x92\x51\xfd\xc2\x1d\x8d\x53\x71\xba\xda\xd7\x8a\x48\x82\x14\x79\x63\x35\xb4\x0b"
}
-- Example 2.5
, VectorPSS
{ message = "\x86\xa8\x3d\x4a\x72\xee\x93\x2a\x4f\x56\x30\xaf\x65\x79\xa3\x86\xb7\x8f\xe8\x89\x99\xe0\xab\xd2\xd4\x90\x34\xa4\xbf\xc8\x54\xdd\x94\xf1\x09\x4e\x2e\x8c\xd7\xa1\x79\xd1\x95\x88\xe4\xae\xfc\x1b\x1b\xd2\x5e\x95\xe3\xdd\x46\x1f"
, salt = "\x17\x63\x9a\x4e\x88\xd7\x22\xc4\xfc\xa2\x4d\x07\x9a\x8b\x29\xc3\x24\x33\xb0\xc9"
, signature = "\x00\xec\x43\x08\x24\x93\x1e\xbd\x3b\xaa\x43\x03\x4d\xae\x98\xba\x64\x6b\x8c\x36\x01\x3d\x16\x71\xc3\xcf\x1c\xf8\x26\x0c\x37\x4b\x19\xf8\xe1\xcc\x8d\x96\x50\x12\x40\x5e\x7e\x9b\xf7\x37\x86\x12\xdf\xcc\x85\xfc\xe1\x2c\xda\x11\xf9\x50\xbd\x0b\xa8\x87\x67\x40\x43\x6c\x1d\x25\x95\xa6\x4a\x1b\x32\xef\xcf\xb7\x4a\x21\xc8\x73\xb3\xcc\x33\xaa\xf4\xe3\xdc\x39\x53\xde\x67\xf0\x67\x4c\x04\x53\xb4\xfd\x9f\x60\x44\x06\xd4\x41\xb8\x16\x09\x8c\xb1\x06\xfe\x34\x72\xbc\x25\x1f\x81\x5f\x59\xdb\x2e\x43\x78\xa3\xad\xdc\x18\x1e\xcf"
}
-- Example 2.6
, VectorPSS
{ message = "\x04\x9f\x91\x54\xd8\x71\xac\x4a\x7c\x7a\xb4\x53\x25\xba\x75\x45\xa1\xed\x08\xf7\x05\x25\xb2\x66\x7c\xf1"
, salt = "\x37\x81\x0d\xef\x10\x55\xed\x92\x2b\x06\x3d\xf7\x98\xde\x5d\x0a\xab\xf8\x86\xee"
, signature = "\x00\x47\x5b\x16\x48\xf8\x14\xa8\xdc\x0a\xbd\xc3\x7b\x55\x27\xf5\x43\xb6\x66\xbb\x6e\x39\xd3\x0e\x5b\x49\xd3\xb8\x76\xdc\xcc\x58\xea\xc1\x4e\x32\xa2\xd5\x5c\x26\x16\x01\x44\x56\xad\x2f\x24\x6f\xc8\xe3\xd5\x60\xda\x3d\xdf\x37\x9a\x1c\x0b\xd2\x00\xf1\x02\x21\xdf\x07\x8c\x21\x9a\x15\x1b\xc8\xd4\xec\x9d\x2f\xc2\x56\x44\x67\x81\x10\x14\xef\x15\xd8\xea\x01\xc2\xeb\xbf\xf8\xc2\xc8\xef\xab\x38\x09\x6e\x55\xfc\xbe\x32\x85\xc7\xaa\x55\x88\x51\x25\x4f\xaf\xfa\x92\xc1\xc7\x2b\x78\x75\x86\x63\xef\x45\x82\x84\x31\x39\xd7\xa6"
}
]
# RSA public exponent e: -- ==================================
01 00 01 -- Example 3: A 1026-bit RSA Key Pair
-- ==================================
# RSA private exponent d: rsaKey3 = PrivateKey
2d 2f f5 67 b3 fe 74 e0 61 91 b7 fd ed 6d e1 12 { private_pub = PublicKey
29 0c 67 06 92 43 0d 59 69 18 40 47 da 23 4c 96 { public_n = 0x02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443
93 de ed 16 73 ed 42 95 39 c9 69 d3 72 c0 4d 6b , public_e = 0x010001
47 e0 f5 b8 ce e0 84 3e 5c 22 83 5d bd 3b 05 a0 , public_size = 129
99 79 84 ae 60 58 b1 1b c4 90 7c bf 67 ed 84 fa }
9a e2 52 df b0 d0 cd 49 e6 18 e3 5d fd fe 59 bc , private_d = 0x651451733b56de5ac0a689a4aeb6e6894a69014e076c88dd7a667eab3232bbccd2fc44ba2fa9c31db46f21edd1fdb23c5c128a5da5bab91e7f952b67759c7cff705415ac9fa0907c7ca6178f668fb948d869da4cc3b7356f4008dfd5449d32ee02d9a477eb69fc29266e5d9070512375a50fbbcc27e238ad98425f6ebbf88991
a3 dd d6 6c 33 ce bb c7 7a d4 41 aa 69 5e 13 e3 , private_p = 0x01bd36e18ece4b0fdb2e9c9d548bd1a7d6e2c21c6fdc35074a1d05b1c6c8b3d558ea2639c9a9a421680169317252558bd148ad215aac550e2dcf12a82d0ebfe853
24 b5 18 f0 1c 60 f5 a8 5c 99 4a d1 79 f2 a6 b5 , private_q = 0x01b1b656ad86d8e19d5dc86292b3a192fdf6e0dd37877bad14822fa00190cab265f90d3f02057b6f54d6ecb14491e5adeacebc48bf0ebd2a2ad26d402e54f61651
fb e9 34 02 b1 17 67 be 01 bf 07 34 44 d6 ba 1d , private_dP = 0x1f2779fd2e3e5e6bae05539518fba0cd0ead1aa4513a7cba18f1cf10e3f68195693d278a0f0ee72f89f9bc760d80e2f9d0261d516501c6ae39f14a476ce2ccf5
d2 bc a5 bd 07 4d 4a 5f ae 35 31 ad 13 03 d8 4b , private_dQ = 0x011a0d36794b04a854aab4b2462d439a5046c91d940b2bc6f75b62956fef35a2a6e63c5309817f307bbff9d59e7e331bd363f6d66849b18346adea169f0ae9aec1
30 d8 97 31 8c bb ba 04 e0 3c 2e 66 de 6d 91 f8 , private_qinv = 0x0b30f0ecf558752fb3a6ce4ba2b8c675f659eba6c376585a1b39712d038ae3d2b46fcb418ae15d0905da6440e1513a30b9b7d6668fbc5e88e5ab7a175e73ba35
2f 96 ea 1d 4b b5 4a 5a ae 10 2d 59 46 57 f5 c9 }
78 95 53 51 2b 29 6d ea 29 d8 02 31 96 35 7e 3e
3a 6e 95 8f 39 e3 c2 34 40 38 ea 60 4b 31 ed c6
f0 f7 ff 6e 71 81 a5 7c 92 82 6a 26 8f 86 76 8e
96 f8 78 56 2f c7 1d 85 d6 9e 44 86 12 f7 04 8f
# Prime p: vectorsKey3 =
cf d5 02 83 fe ee b9 7f 6f 08 d7 3c bc 7b 38 36 [
f8 2b bc d4 99 47 9f 5e 6f 76 fd fc b8 b3 8c 4f -- Example 3.1
71 dc 9e 88 bd 6a 6f 76 37 1a fd 65 d2 af 18 62 VectorPSS
b3 2a fb 34 a9 5f 71 b8 b1 32 04 3f fe be 3a 95 { message = "\x59\x4b\x37\x33\x3b\xbb\x2c\x84\x52\x4a\x87\xc1\xa0\x1f\x75\xfc\xec\x0e\x32\x56\xf1\x08\xe3\x8d\xca\x36\xd7\x0d\x00\x57"
2b af 75 92 44 81 48 c0 3f 9c 69 b1 d6 8e 4c e5 , salt = "\xf3\x1a\xd6\xc8\xcf\x89\xdf\x78\xed\x77\xfe\xac\xbc\xc2\xf8\xb0\xa8\xe4\xcf\xaa"
cf 32 c8 6b af 46 fe d3 01 ca 1a b4 03 06 9b 32 , signature = "\x00\x88\xb1\x35\xfb\x17\x94\xb6\xb9\x6c\x4a\x3e\x67\x81\x97\xf8\xca\xc5\x2b\x64\xb2\xfe\x90\x7d\x6f\x27\xde\x76\x11\x24\x96\x4a\x99\xa0\x1a\x88\x27\x40\xec\xfa\xed\x6c\x01\xa4\x74\x64\xbb\x05\x18\x23\x13\xc0\x13\x38\xa8\xcd\x09\x72\x14\xcd\x68\xca\x10\x3b\xd5\x7d\x3b\xc9\xe8\x16\x21\x3e\x61\xd7\x84\xf1\x82\x46\x7a\xbf\x8a\x01\xcf\x25\x3e\x99\xa1\x56\xea\xa8\xe3\xe1\xf9\x0e\x3c\x6e\x4e\x3a\xa2\xd8\x3e\xd0\x34\x5b\x89\xfa\xfc\x9c\x26\x07\x7c\x14\xb6\xac\x51\x45\x4f\xa2\x6e\x44\x6e\x3a\x2f\x15\x3b\x2b\x16\x79\x7f"
f4 56 b9 1f 71 89 8a b0 81 cd 8c 42 52 ef 52 71 }
91 5c 97 94 b8 f2 95 85 1d a7 51 0f 99 cb 73 eb -- Example 3.2
, VectorPSS
{ message = "\x8b\x76\x95\x28\x88\x4a\x0d\x1f\xfd\x09\x0c\xf1\x02\x99\x3e\x79\x6d\xad\xcf\xbd\xdd\x38\xe4\x4f\xf6\x32\x4c\xa4\x51"
, salt = "\xfc\xf9\xf0\xe1\xf1\x99\xa3\xd1\xd0\xda\x68\x1c\x5b\x86\x06\xfc\x64\x29\x39\xf7"
, signature = "\x02\xa5\xf0\xa8\x58\xa0\x86\x4a\x4f\x65\x01\x7a\x7d\x69\x45\x4f\x3f\x97\x3a\x29\x99\x83\x9b\x7b\xbc\x48\xbf\x78\x64\x11\x69\x17\x95\x56\xf5\x95\xfa\x41\xf6\xff\x18\xe2\x86\xc2\x78\x30\x79\xbc\x09\x10\xee\x9c\xc3\x4f\x49\xba\x68\x11\x24\xf9\x23\xdf\xa8\x8f\x42\x61\x41\xa3\x68\xa5\xf5\xa9\x30\xc6\x28\xc2\xc3\xc2\x00\xe1\x8a\x76\x44\x72\x1a\x0c\xbe\xc6\xdd\x3f\x62\x79\xbd\xe3\xe8\xf2\xbe\x5e\x2d\x4e\xe5\x6f\x97\xe7\xce\xaf\x33\x05\x4b\xe7\x04\x2b\xd9\x1a\x63\xbb\x09\xf8\x97\xbd\x41\xe8\x11\x97\xde\xe9\x9b\x11\xaf"
}
-- Example 3.3
, VectorPSS
{ message = "\x1a\xbd\xba\x48\x9c\x5a\xda\x2f\x99\x5e\xd1\x6f\x19\xd5\xa9\x4d\x9e\x6e\xc3\x4a\x8d\x84\xf8\x45\x57\xd2\x6e\x5e\xf9\xb0\x2b\x22\x88\x7e\x3f\x9a\x4b\x69\x0a\xd1\x14\x92\x09\xc2\x0c\x61\x43\x1f\x0c\x01\x7c\x36\xc2\x65\x7b\x35\xd7\xb0\x7d\x3f\x5a\xd8\x70\x85\x07\xa9\xc1\xb8\x31\xdf\x83\x5a\x56\xf8\x31\x07\x18\x14\xea\x5d\x3d\x8d\x8f\x6a\xde\x40\xcb\xa3\x8b\x42\xdb\x7a\x2d\x3d\x7a\x29\xc8\xf0\xa7\x9a\x78\x38\xcf\x58\xa9\x75\x7f\xa2\xfe\x4c\x40\xdf\x9b\xaa\x19\x3b\xfc\x6f\x92\xb1\x23\xad\x57\xb0\x7a\xce\x3e\x6a\xc0\x68\xc9\xf1\x06\xaf\xd9\xee\xb0\x3b\x4f\x37\xc2\x5d\xbf\xbc\xfb\x30\x71\xf6\xf9\x77\x17\x66\xd0\x72\xf3\xbb\x07\x0a\xf6\x60\x55\x32\x97\x3a\xe2\x50\x51"
, salt = "\x98\x6e\x7c\x43\xdb\xb6\x71\xbd\x41\xb9\xa7\xf4\xb6\xaf\xc8\x0e\x80\x5f\x24\x23"
, signature = "\x02\x44\xbc\xd1\xc8\xc1\x69\x55\x73\x6c\x80\x3b\xe4\x01\x27\x2e\x18\xcb\x99\x08\x11\xb1\x4f\x72\xdb\x96\x41\x24\xd5\xfa\x76\x06\x49\xcb\xb5\x7a\xfb\x87\x55\xdb\xb6\x2b\xf5\x1f\x46\x6c\xf2\x3a\x0a\x16\x07\x57\x6e\x98\x3d\x77\x8f\xce\xff\xa9\x2d\xf7\x54\x8a\xea\x8e\xa4\xec\xad\x2c\x29\xdd\x9f\x95\xbc\x07\xfe\x91\xec\xf8\xbe\xe2\x55\xbf\xe8\x76\x2f\xd7\x69\x0a\xa9\xbf\xa4\xfa\x08\x49\xef\x72\x8c\x2c\x42\xc4\x53\x23\x64\x52\x2d\xf2\xab\x7f\x9f\x8a\x03\xb6\x3f\x7a\x49\x91\x75\x82\x86\x68\xf5\xef\x5a\x29\xe3\x80\x2c"
}
-- Example 3.4
, VectorPSS
{ message = "\x8f\xb4\x31\xf5\xee\x79\x2b\x6c\x2a\xc7\xdb\x53\xcc\x42\x86\x55\xae\xb3\x2d\x03\xf4\xe8\x89\xc5\xc2\x5d\xe6\x83\xc4\x61\xb5\x3a\xcf\x89\xf9\xf8\xd3\xaa\xbd\xf6\xb9\xf0\xc2\xa1\xde\x12\xe1\x5b\x49\xed\xb3\x91\x9a\x65\x2f\xe9\x49\x1c\x25\xa7\xfc\xe1\xf7\x22\xc2\x54\x36\x08\xb6\x9d\xc3\x75\xec"
, salt = "\xf8\x31\x2d\x9c\x8e\xea\x13\xec\x0a\x4c\x7b\x98\x12\x0c\x87\x50\x90\x87\xc4\x78"
, signature = "\x01\x96\xf1\x2a\x00\x5b\x98\x12\x9c\x8d\xf1\x3c\x4c\xb1\x6f\x8a\xa8\x87\xd3\xc4\x0d\x96\xdf\x3a\x88\xe7\x53\x2e\xf3\x9c\xd9\x92\xf2\x73\xab\xc3\x70\xbc\x1b\xe6\xf0\x97\xcf\xeb\xbf\x01\x18\xfd\x9e\xf4\xb9\x27\x15\x5f\x3d\xf2\x2b\x90\x4d\x90\x70\x2d\x1f\x7b\xa7\xa5\x2b\xed\x8b\x89\x42\xf4\x12\xcd\x7b\xd6\x76\xc9\xd1\x8e\x17\x03\x91\xdc\xd3\x45\xc0\x6a\x73\x09\x64\xb3\xf3\x0b\xcc\xe0\xbb\x20\xba\x10\x6f\x9a\xb0\xee\xb3\x9c\xf8\xa6\x60\x7f\x75\xc0\x34\x7f\x0a\xf7\x9f\x16\xaf\xa0\x81\xd2\xc9\x2d\x1e\xe6\xf8\x36\xb8"
}
-- Example 3.5
, VectorPSS
{ message = "\xfe\xf4\x16\x1d\xfa\xaf\x9c\x52\x95\x05\x1d\xfc\x1f\xf3\x81\x0c\x8c\x9e\xc2\xe8\x66\xf7\x07\x54\x22\xc8\xec\x42\x16\xa9\xc4\xff\x49\x42\x7d\x48\x3c\xae\x10\xc8\x53\x4a\x41\xb2\xfd\x15\xfe\xe0\x69\x60\xec\x6f\xb3\xf7\xa7\xe9\x4a\x2f\x8a\x2e\x3e\x43\xdc\x4a\x40\x57\x6c\x30\x97\xac\x95\x3b\x1d\xe8\x6f\x0b\x4e\xd3\x6d\x64\x4f\x23\xae\x14\x42\x55\x29\x62\x24\x64\xca\x0c\xbf\x0b\x17\x41\x34\x72\x38\x15\x7f\xab\x59\xe4\xde\x55\x24\x09\x6d\x62\xba\xec\x63\xac\x64"
, salt = "\x50\x32\x7e\xfe\xc6\x29\x2f\x98\x01\x9f\xc6\x7a\x2a\x66\x38\x56\x3e\x9b\x6e\x2d"
, signature = "\x02\x1e\xca\x3a\xb4\x89\x22\x64\xec\x22\x41\x1a\x75\x2d\x92\x22\x10\x76\xd4\xe0\x1c\x0e\x6f\x0d\xde\x9a\xfd\x26\xba\x5a\xcf\x6d\x73\x9e\xf9\x87\x54\x5d\x16\x68\x3e\x56\x74\xc9\xe7\x0f\x1d\xe6\x49\xd7\xe6\x1d\x48\xd0\xca\xeb\x4f\xb4\xd8\xb2\x4f\xba\x84\xa6\xe3\x10\x8f\xee\x7d\x07\x05\x97\x32\x66\xac\x52\x4b\x4a\xd2\x80\xf7\xae\x17\xdc\x59\xd9\x6d\x33\x51\x58\x6b\x5a\x3b\xdb\x89\x5d\x1e\x1f\x78\x20\xac\x61\x35\xd8\x75\x34\x80\x99\x83\x82\xba\x32\xb7\x34\x95\x59\x60\x8c\x38\x74\x52\x90\xa8\x5e\xf4\xe9\xf9\xbd\x83"
}
-- Example 3.6
, VectorPSS
{ message = "\xef\xd2\x37\xbb\x09\x8a\x44\x3a\xee\xb2\xbf\x6c\x3f\x8c\x81\xb8\xc0\x1b\x7f\xcb\x3f\xeb"
, salt = "\xb0\xde\x3f\xc2\x5b\x65\xf5\xaf\x96\xb1\xd5\xcc\x3b\x27\xd0\xc6\x05\x30\x87\xb3"
, signature = "\x01\x2f\xaf\xec\x86\x2f\x56\xe9\xe9\x2f\x60\xab\x0c\x77\x82\x4f\x42\x99\xa0\xca\x73\x4e\xd2\x6e\x06\x44\xd5\xd2\x22\xc7\xf0\xbd\xe0\x39\x64\xf8\xe7\x0a\x5c\xb6\x5e\xd4\x4e\x44\xd5\x6a\xe0\xed\xf1\xff\x86\xca\x03\x2c\xc5\xdd\x44\x04\xdb\xb7\x6a\xb8\x54\x58\x6c\x44\xee\xd8\x33\x6d\x08\xd4\x57\xce\x6c\x03\x69\x3b\x45\xc0\xf1\xef\xef\x93\x62\x4b\x95\xb8\xec\x16\x9c\x61\x6d\x20\xe5\x53\x8e\xbc\x0b\x67\x37\xa6\xf8\x2b\x4b\xc0\x57\x09\x24\xfc\x6b\x35\x75\x9a\x33\x48\x42\x62\x79\xf8\xb3\xd7\x74\x4e\x2d\x22\x24\x26\xce"
}
]
# Prime q: -- ==================================
cc 4e 90 d2 a1 b3 a0 65 d3 b2 d1 f5 a8 fc e3 1b -- Example 8: A 1031-bit RSA Key Pair
54 44 75 66 4e ab 56 1d 29 71 b9 9f b7 be f8 44 -- ==================================
e8 ec 1f 36 0b 8c 2a c8 35 96 92 97 1e a6 a3 8f
72 3f cc 21 1f 5d bc b1 77 a0 fd ac 51 64 a1 d4
ff 7f bb 4e 82 99 86 35 3c b9 83 65 9a 14 8c dd
42 0c 7d 31 ba 38 22 ea 90 a3 2b e4 6c 03 0e 8c
17 e1 fa 0a d3 78 59 e0 6b 0a a6 fa 3b 21 6d 9c
be 6c 0e 22 33 97 69 c0 a6 15 91 3e 5d a7 19 cf
# p's CRT exponent dP: rsaKey8 = PrivateKey
1c 2d 1f c3 2f 6b c4 00 4f d8 5d fd e0 fb bf 9a { private_pub = PublicKey
4c 38 f9 c7 c4 e4 1d ea 1a a8 82 34 a2 01 cd 92 { public_n = 0x495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f
f3 b7 da 52 65 83 a9 8a d8 5b b3 60 fb 98 3b 71 , public_e = 0x010001
1e 23 44 9d 56 1d 17 78 d7 a5 15 48 6b cb f4 7b , public_size = 129
46 c9 e9 e1 a3 a1 f7 70 00 ef be b0 9a 8a fe 47 }
e5 b8 57 cd a9 9c b1 6d 7f ff 9b 71 2e 3b d6 0c , private_d = 0x6c66ffe98980c38fcdeab5159898836165f4b4b817c4f6a8d486ee4ea9130fe9b9092bd136d184f95f504a607eac565846d2fdd6597a8967c7396ef95a6eeebb4578a643966dca4d8ee3de842de63279c618159c1ab54a89437b6a6120e4930afb52a4ba6ced8a4947ac64b30a3497cbe701c2d6266d517219ad0ec6d347dbe9
a9 6d 9c 79 73 d6 16 d4 69 34 a9 c0 50 28 1c 00 , private_p = 0x08dad7f11363faa623d5d6d5e8a319328d82190d7127d2846c439b0ab72619b0a43a95320e4ec34fc3a9cea876422305bd76c5ba7be9e2f410c8060645a1d29edb
43 99 ce ff 1d b7 dd a7 87 66 a8 a9 b9 cb 08 73 , private_q = 0x0847e732376fc7900f898ea82eb2b0fc418565fdae62f7d9ec4ce2217b97990dd272db157f99f63c0dcbb9fbacdbd4c4dadb6df67756358ca4174825b48f49706d
, private_dP = 0x05c2a83c124b3621a2aa57ea2c3efe035eff4560f33ddebb7adab81fce69a0c8c2edc16520dda83d59a23be867963ac65f2cc710bbcfb96ee103deb771d105fd85
, private_dQ = 0x04cae8aa0d9faa165c87b682ec140b8ed3b50b24594b7a3b2c220b3669bb819f984f55310a1ae7823651d4a02e99447972595139363434e5e30a7e7d241551e1b9
, private_qinv = 0x07d3e47bf686600b11ac283ce88dbb3f6051e8efd04680e44c171ef531b80b2b7c39fc766320e2cf15d8d99820e96ff30dc69691839c4b40d7b06e45307dc91f3f
}
# q's CRT exponent dQ: vectorsKey8 =
cb 3b 3c 04 ca a5 8c 60 be 7d 9b 2d eb b3 e3 96 [
43 f4 f5 73 97 be 08 23 6a 1e 9e af aa 70 65 36 -- Example 8.1
e7 1c 3a cf e0 1c c6 51 f2 3c 9e 05 85 8f ee 13 VectorPSS
bb 6a 8a fc 47 df 4e dc 9a 4b a3 0b ce cb 73 d0 { message = "\x81\x33\x2f\x4b\xe6\x29\x48\x41\x5e\xa1\xd8\x99\x79\x2e\xea\xcf\x6c\x6e\x1d\xb1\xda\x8b\xe1\x3b\x5c\xea\x41\xdb\x2f\xed\x46\x70\x92\xe1\xff\x39\x89\x14\xc7\x14\x25\x97\x75\xf5\x95\xf8\x54\x7f\x73\x56\x92\xa5\x75\xe6\x92\x3a\xf7\x8f\x22\xc6\x99\x7d\xdb\x90\xfb\x6f\x72\xd7\xbb\x0d\xd5\x74\x4a\x31\xde\xcd\x3d\xc3\x68\x58\x49\x83\x6e\xd3\x4a\xec\x59\x63\x04\xad\x11\x84\x3c\x4f\x88\x48\x9f\x20\x97\x35\xf5\xfb\x7f\xda\xf7\xce\xc8\xad\xdc\x58\x18\x16\x8f\x88\x0a\xcb\xf4\x90\xd5\x10\x05\xb7\xa8\xe8\x4e\x43\xe5\x42\x87\x97\x75\x71\xdd\x99\xee\xa4\xb1\x61\xeb\x2d\xf1\xf5\x10\x8f\x12\xa4\x14\x2a\x83\x32\x2e\xdb\x05\xa7\x54\x87\xa3\x43\x5c\x9a\x78\xce\x53\xed\x93\xbc\x55\x08\x57\xd7\xa9\xfb"
15 78 52 32 7e e7 89 01 5c 2e 8d ee 7b 9f 05 a0 , salt = "\x1d\x65\x49\x1d\x79\xc8\x64\xb3\x73\x00\x9b\xe6\xf6\xf2\x46\x7b\xac\x4c\x78\xfa"
f3 1a c9 4e b6 17 31 64 74 0c 5c 95 14 7c d5 f3 , signature = "\x02\x62\xac\x25\x4b\xfa\x77\xf3\xc1\xac\xa2\x2c\x51\x79\xf8\xf0\x40\x42\x2b\x3c\x5b\xaf\xd4\x0a\x8f\x21\xcf\x0f\xa5\xa6\x67\xcc\xd5\x99\x3d\x42\xdb\xaf\xb4\x09\xc5\x20\xe2\x5f\xce\x2b\x1e\xe1\xe7\x16\x57\x7f\x1e\xfa\x17\xf3\xda\x28\x05\x2f\x40\xf0\x41\x9b\x23\x10\x6d\x78\x45\xaa\xf0\x11\x25\xb6\x98\xe7\xa4\xdf\xe9\x2d\x39\x67\xbb\x00\xc4\xd0\xd3\x5b\xa3\x55\x2a\xb9\xa8\xb3\xee\xf0\x7c\x7f\xec\xdb\xc5\x42\x4a\xc4\xdb\x1e\x20\xcb\x37\xd0\xb2\x74\x47\x69\x94\x0e\xa9\x07\xe1\x7f\xbb\xca\x67\x3b\x20\x52\x23\x80\xc5"
b5 ae 2c b4 a8 37 87 f0 1d 8a b3 1f 27 c2 d0 ee }
a2 dd 8a 11 ab 90 6a ba 20 7c 43 c6 ee 12 53 31 -- Example 8.2
, VectorPSS
# CRT coefficient qInv: { message = "\xe2\xf9\x6e\xaf\x0e\x05\xe7\xba\x32\x6e\xcc\xa0\xba\x7f\xd2\xf7\xc0\x23\x56\xf3\xce\xde\x9d\x0f\xaa\xbf\x4f\xcc\x8e\x60\xa9\x73\xe5\x59\x5f\xd9\xea\x08"
12 f6 b2 cf 13 74 a7 36 fa d0 56 16 05 0f 96 ab , salt = "\x43\x5c\x09\x8a\xa9\x90\x9e\xb2\x37\x7f\x12\x48\xb0\x91\xb6\x89\x87\xff\x18\x38"
4b 61 d1 17 7c 7f 9d 52 5a 29 f3 d1 80 e7 76 67 , signature = "\x27\x07\xb9\xad\x51\x15\xc5\x8c\x94\xe9\x32\xe8\xec\x0a\x28\x0f\x56\x33\x9e\x44\xa1\xb5\x8d\x4d\xdc\xff\x2f\x31\x2e\x5f\x34\xdc\xfe\x39\xe8\x9c\x6a\x94\xdc\xee\x86\xdb\xbd\xae\x5b\x79\xba\x4e\x08\x19\xa9\xe7\xbf\xd9\xd9\x82\xe7\xee\x6c\x86\xee\x68\x39\x6e\x8b\x3a\x14\xc9\xc8\xf3\x4b\x17\x8e\xb7\x41\xf9\xd3\xf1\x21\x10\x9b\xf5\xc8\x17\x2f\xad\xa2\xe7\x68\xf9\xea\x14\x33\x03\x2c\x00\x4a\x8a\xa0\x7e\xb9\x90\x00\x0a\x48\xdc\x94\xc8\xba\xc8\xaa\xbe\x2b\x09\xb1\xaa\x46\xc0\xa2\xaa\x0e\x12\xf6\x3f\xbb\xa7\x75\xba\x7e"
e9 9d 99 ab f0 52 5d 07 58 66 0f 37 52 65 5b 0f }
25 b8 df 84 31 d9 a8 ff 77 c1 6c 12 a0 a5 12 2a -- Example 8.3
9f 0b f7 cf d5 a2 66 a3 5c 15 9f 99 12 08 b9 03 , VectorPSS
16 ff 44 4f 3e 0b 6b d0 e9 3b 8a 7a 24 48 e9 57 { message = "\xe3\x5c\x6e\xd9\x8f\x64\xa6\xd5\xa6\x48\xfc\xab\x8a\xdb\x16\x33\x1d\xb3\x2e\x5d\x15\xc7\x4a\x40\xed\xf9\x4c\x3d\xc4\xa4\xde\x79\x2d\x19\x08\x89\xf2\x0f\x1e\x24\xed\x12\x05\x4a\x6b\x28\x79\x8f\xcb\x42\xd1\xc5\x48\x76\x9b\x73\x4c\x96\x37\x31\x42\x09\x2a\xed\x27\x76\x03\xf4\x73\x8d\xf4\xdc\x14\x46\x58\x6d\x0e\xc6\x4d\xa4\xfb\x60\x53\x6d\xb2\xae\x17\xfc\x7e\x3c\x04\xbb\xfb\xbb\xd9\x07\xbf\x11\x7c\x08\x63\x6f\xa1\x6f\x95\xf5\x1a\x62\x16\x93\x4d\x3e\x34\xf8\x50\x30\xf1\x7b\xbb\xc5\xba\x69\x14\x40\x58\xaf\xf0\x81\xe0\xb1\x9c\xf0\x3c\x17\x19\x5c\x5e\x88\x8b\xa5\x8f\x6f\xe0\xa0\x2e\x5c\x3b\xda\x97\x19\xa7"
e3 dd a6 cf cf 22 66 b1 06 01 3a c4 68 08 d3 b3 , salt = "\xc6\xeb\xbe\x76\xdf\x0c\x4a\xea\x32\xc4\x74\x17\x5b\x2f\x13\x68\x62\xd0\x45\x29"
88 7b 3b 00 34 4b aa c9 53 0b 4c e7 08 fc 32 b6 , signature = "\x2a\xd2\x05\x09\xd7\x8c\xf2\x6d\x1b\x6c\x40\x61\x46\x08\x6e\x4b\x0c\x91\xa9\x1c\x2b\xd1\x64\xc8\x7b\x96\x6b\x8f\xaa\x42\xaa\x0c\xa4\x46\x02\x23\x23\xba\x4b\x1a\x1b\x89\x70\x6d\x7f\x4c\x3b\xe5\x7d\x7b\x69\x70\x2d\x16\x8a\xb5\x95\x5e\xe2\x90\x35\x6b\x8c\x4a\x29\xed\x46\x7d\x54\x7e\xc2\x3c\xba\xdf\x28\x6c\xcb\x58\x63\xc6\x67\x9d\xa4\x67\xfc\x93\x24\xa1\x51\xc7\xec\x55\xaa\xc6\xdb\x40\x84\xf8\x27\x26\x82\x5c\xfe\x1a\xa4\x21\xbc\x64\x04\x9f\xb4\x2f\x23\x14\x8f\x9c\x25\xb2\xdc\x30\x04\x37\xc3\x8d\x42\x8a\xa7\x5f\x96"
}
# --------------------------------- -- Example 8.4
# RSASSA-PSS Signature Example 10.1 , VectorPSS
# --------------------------------- { message = "\xdb\xc5\xf7\x50\xa7\xa1\x4b\xe2\xb9\x3e\x83\x8d\x18\xd1\x4a\x86\x95\xe5\x2e\x8a\xdd\x9c\x0a\xc7\x33\xb8\xf5\x6d\x27\x47\xe5\x29\xa0\xcc\xa5\x32\xdd\x49\xb9\x02\xae\xfe\xd5\x14\x44\x7f\x9e\x81\xd1\x61\x95\xc2\x85\x38\x68\xcb\x9b\x30\xf7\xd0\xd4\x95\xc6\x9d\x01\xb5\xc5\xd5\x0b\x27\x04\x5d\xb3\x86\x6c\x23\x24\xa4\x4a\x11\x0b\x17\x17\x74\x6d\xe4\x57\xd1\xc8\xc4\x5c\x3c\xd2\xa9\x29\x70\xc3\xd5\x96\x32\x05\x5d\x4c\x98\xa4\x1d\x6e\x99\xe2\xa3\xdd\xd5\xf7\xf9\x97\x9a\xb3\xcd\x18\xf3\x75\x05\xd2\x51\x41\xde\x2a\x1b\xff\x17\xb3\xa7\xdc\xe9\x41\x9e\xcc\x38\x5c\xf1\x1d\x72\x84\x0f\x19\x95\x3f\xd0\x50\x92\x51\xf6\xca\xfd\xe2\x89\x3d\x0e\x75\xc7\x81\xba\x7a\x50\x12\xca\x40\x1a\x4f\xa9\x9e\x04\xb3\xc3\x24\x9f\x92\x6d\x5a\xfe\x82\xcc\x87\xda\xb2\x2c\x3c\x1b\x10\x5d\xe4\x8e\x34\xac\xe9\xc9\x12\x4e\x59\x59\x7a\xc7\xeb\xf8"
, salt = "\x02\x1f\xdc\xc6\xeb\xb5\xe1\x9b\x1c\xb1\x6e\x9c\x67\xf2\x76\x81\x65\x7f\xe2\x0a"
# Message to be signed: , signature = "\x1e\x24\xe6\xe5\x86\x28\xe5\x17\x50\x44\xa9\xeb\x6d\x83\x7d\x48\xaf\x12\x60\xb0\x52\x0e\x87\x32\x7d\xe7\x89\x7e\xe4\xd5\xb9\xf0\xdf\x0b\xe3\xe0\x9e\xd4\xde\xa8\xc1\x45\x4f\xf3\x42\x3b\xb0\x8e\x17\x93\x24\x5a\x9d\xf8\xbf\x6a\xb3\x96\x8c\x8e\xdd\xc3\xb5\x32\x85\x71\xc7\x7f\x09\x1c\xc5\x78\x57\x69\x12\xdf\xeb\xd1\x64\xb9\xde\x54\x54\xfe\x0b\xe1\xc1\xf6\x38\x5b\x32\x83\x60\xce\x67\xec\x7a\x05\xf6\xe3\x0e\xb4\x5c\x17\xc4\x8a\xc7\x00\x41\xd2\xca\xb6\x7f\x0a\x2a\xe7\xaa\xfd\xcc\x8d\x24\x5e\xa3\x44\x2a\x63\x00\xcc\xc7"
88 31 77 e5 12 6b 9b e2 d9 a9 68 03 27 d5 37 0c }
6f 26 86 1f 58 20 c4 3d a6 7a 3a d6 09 -- Example 8.5
, VectorPSS
# Salt: { message = "\x04\xdc\x25\x1b\xe7\x2e\x88\xe5\x72\x34\x85\xb6\x38\x3a\x63\x7e\x2f\xef\xe0\x76\x60\xc5\x19\xa5\x60\xb8\xbc\x18\xbd\xed\xb8\x6e\xae\x23\x64\xea\x53\xba\x9d\xca\x6e\xb3\xd2\xe7\xd6\xb8\x06\xaf\x42\xb3\xe8\x7f\x29\x1b\x4a\x88\x81\xd5\xbf\x57\x2c\xc9\xa8\x5e\x19\xc8\x6a\xcb\x28\xf0\x98\xf9\xda\x03\x83\xc5\x66\xd3\xc0\xf5\x8c\xfd\x8f\x39\x5d\xcf\x60\x2e\x5c\xd4\x0e\x8c\x71\x83\xf7\x14\x99\x6e\x22\x97\xef"
04 e2 15 ee 6f f9 34 b9 da 70 d7 73 0c 87 34 ab , salt = "\xc5\x58\xd7\x16\x7c\xbb\x45\x08\xad\xa0\x42\x97\x1e\x71\xb1\x37\x7e\xea\x42\x69"
fc ec de 89 , signature = "\x33\x34\x1b\xa3\x57\x6a\x13\x0a\x50\xe2\xa5\xcf\x86\x79\x22\x43\x88\xd5\x69\x3f\x5a\xcc\xc2\x35\xac\x95\xad\xd6\x8e\x5e\xb1\xee\xc3\x16\x66\xd0\xca\x7a\x1c\xda\x6f\x70\xa1\xaa\x76\x2c\x05\x75\x2a\x51\x95\x0c\xdb\x8a\xf3\xc5\x37\x9f\x18\xcf\xe6\xb5\xbc\x55\xa4\x64\x82\x26\xa1\x5e\x91\x2e\xf1\x9a\xd7\x7a\xde\xea\x91\x1d\x67\xcf\xef\xd6\x9b\xa4\x3f\xa4\x11\x91\x35\xff\x64\x21\x17\xba\x98\x5a\x7e\x01\x00\x32\x5e\x95\x19\xf1\xca\x6a\x92\x16\xbd\xa0\x55\xb5\x78\x50\x15\x29\x11\x25\xe9\x0d\xcd\x07\xa2\xca\x96\x73\xee"
}
# Signature: -- Example 8.6
82 c2 b1 60 09 3b 8a a3 c0 f7 52 2b 19 f8 73 54 , VectorPSS
06 6c 77 84 7a bf 2a 9f ce 54 2d 0e 84 e9 20 c5 { message = "\x0e\xa3\x7d\xf9\xa6\xfe\xa4\xa8\xb6\x10\x37\x3c\x24\xcf\x39\x0c\x20\xfa\x6e\x21\x35\xc4\x00\xc8\xa3\x4f\x5c\x18\x3a\x7e\x8e\xa4\xc9\xae\x09\x0e\xd3\x17\x59\xf4\x2d\xc7\x77\x19\xcc\xa4\x00\xec\xdc\xc5\x17\xac\xfc\x7a\xc6\x90\x26\x75\xb2\xef\x30\xc5\x09\x66\x5f\x33\x21\x48\x2f\xc6\x9a\x9f\xb5\x70\xd1\x5e\x01\xc8\x45\xd0\xd8\xe5\x0d\x2a\x24\xcb\xf1\xcf\x0e\x71\x49\x75\xa5\xdb\x7b\x18\xd9\xe9\xe9\xcb\x91\xb5\xcb\x16\x86\x90\x60\xed\x18\xb7\xb5\x62\x45\x50\x3f\x0c\xaf\x90\x35\x2b\x8d\xe8\x1c\xb5\xa1\xd9\xc6\x33\x60\x92\xf0\xcd"
af b4 9f fd fd ac e1 65 60 ee 94 a1 36 96 01 14 , salt = "\x76\xfd\x4e\x64\xfd\xc9\x8e\xb9\x27\xa0\x40\x3e\x35\xa0\x84\xe7\x6b\xa9\xf9\x2a"
8e ba d7 a0 e1 51 cf 16 33 17 91 a5 72 7d 05 f2 , signature = "\x1e\xd1\xd8\x48\xfb\x1e\xdb\x44\x12\x9b\xd9\xb3\x54\x79\x5a\xf9\x7a\x06\x9a\x7a\x00\xd0\x15\x10\x48\x59\x3e\x0c\x72\xc3\x51\x7f\xf9\xff\x2a\x41\xd0\xcb\x5a\x0a\xc8\x60\xd7\x36\xa1\x99\x70\x4f\x7c\xb6\xa5\x39\x86\xa8\x8b\xbd\x8a\xbc\xc0\x07\x6a\x2c\xe8\x47\x88\x00\x31\x52\x5d\x44\x9d\xa2\xac\x78\x35\x63\x74\xc5\x36\xe3\x43\xfa\xa7\xcb\xa4\x2a\x5a\xaa\x65\x06\x08\x77\x91\xc0\x6a\x8e\x98\x93\x35\xae\xd1\x9b\xfa\xb2\xd5\xe6\x7e\x27\xfb\x0c\x28\x75\xaf\x89\x6c\x21\xb6\xe8\xe7\x30\x9d\x04\xe4\xf6\x72\x7e\x69\x46\x3e"
1e 74 e7 eb 81 14 40 20 69 35 d7 44 76 5a 15 e7 }
9f 01 5c b6 6c 53 2c 87 a6 a0 59 61 c8 bf ad 74 ]
1a 9a 66 57 02 28 94 39 3e 72 23 73 97 96 c0 2a
77 45 5d 0f 55 5b 0e c0 1d df 25 9b 62 07 fd 0f
d5 76 14 ce f1 a5 57 3b aa ff 4e c0 00 69 95 16
59 b8 5f 24 30 0a 25 16 0c a8 52 2d c6 e6 72 7e
57 d0 19 d7 e6 36 29 b8 fe 5e 89 e2 5c c1 5b eb
3a 64 75 77 55 92 99 28 0b 9b 28 f7 9b 04 09 00
0b e2 5b bd 96 40 8b a3 b4 3c c4 86 18 4d d1 c8
e6 25 53 fa 1a f4 04 0f 60 66 3d e7 f5 e4 9c 04
38 8e 25 7f 1c e8 9c 95 da b4 8a 31 5d 9b 66 b1
b7 62 82 33 87 6f f2 38 52 30 d0 70 d0 7e 16 66
# ---------------------------------
# RSASSA-PSS Signature Example 10.2
# ---------------------------------
# Message to be signed:
dd 67 0a 01 46 58 68 ad c9 3f 26 13 19 57 a5 0c
52 fb 77 7c db aa 30 89 2c 9e 12 36 11 64 ec 13
97 9d 43 04 81 18 e4 44 5d b8 7b ee 58 dd 98 7b
34 25 d0 20 71 d8 db ae 80 70 8b 03 9d bb 64 db
d1 de 56 57 d9 fe d0 c1 18 a5 41 43 74 2e 0f f3
c8 7f 74 e4 58 57 64 7a f3 f7 9e b0 a1 4c 9d 75
ea 9a 1a 04 b7 cf 47 8a 89 7a 70 8f d9 88 f4 8e
80 1e db 0b 70 39 df 8c 23 bb 3c 56 f4 e8 21 ac
# Salt:
8b 2b dd 4b 40 fa f5 45 c7 78 dd f9 bc 1a 49 cb
57 f9 b7 1b
# Signature:
14 ae 35 d9 dd 06 ba 92 f7 f3 b8 97 97 8a ed 7c
d4 bf 5f f0 b5 85 a4 0b d4 6c e1 b4 2c d2 70 30
53 bb 90 44 d6 4e 81 3d 8f 96 db 2d d7 00 7d 10
11 8f 6f 8f 84 96 09 7a d7 5e 1f f6 92 34 1b 28
92 ad 55 a6 33 a1 c5 5e 7f 0a 0a d5 9a 0e 20 3a
5b 82 78 ae c5 4d d8 62 2e 28 31 d8 71 74 f8 ca
ff 43 ee 6c 46 44 53 45 d8 4a 59 65 9b fb 92 ec
d4 c8 18 66 86 95 f3 47 06 f6 68 28 a8 99 59 63
7f 2b f3 e3 25 1c 24 bd ba 4d 4b 76 49 da 00 22
21 8b 11 9c 84 e7 9a 65 27 ec 5b 8a 5f 86 1c 15
99 52 e2 3e c0 5e 1e 71 73 46 fa ef e8 b1 68 68
25 bd 2b 26 2f b2 53 10 66 c0 de 09 ac de 2e 42
31 69 07 28 b5 d8 5e 11 5a 2f 6b 92 b7 9c 25 ab
c9 bd 93 99 ff 8b cf 82 5a 52 ea 1f 56 ea 76 dd
26 f4 3b aa fa 18 bf a9 2a 50 4c bd 35 69 9e 26
d1 dc c5 a2 88 73 85 f3 c6 32 32 f0 6f 32 44 c3
# ---------------------------------
# RSASSA-PSS Signature Example 10.3
# ---------------------------------
# Message to be signed:
48 b2 b6 a5 7a 63 c8 4c ea 85 9d 65 c6 68 28 4b
08 d9 6b dc aa be 25 2d b0 e4 a9 6c b1 ba c6 01
93 41 db 6f be fb 8d 10 6b 0e 90 ed a6 bc c6 c6
26 2f 37 e7 ea 9c 7e 5d 22 6b d7 df 85 ec 5e 71
ef ff 2f 54 c5 db 57 7f f7 29 ff 91 b8 42 49 1d
e2 74 1d 0c 63 16 07 df 58 6b 90 5b 23 b9 1a f1
3d a1 23 04 bf 83 ec a8 a7 3e 87 1f f9 db
# Salt:
4e 96 fc 1b 39 8f 92 b4 46 71 01 0c 0d c3 ef d6
e2 0c 2d 73
# Signature:
6e 3e 4d 7b 6b 15 d2 fb 46 01 3b 89 00 aa 5b bb
39 39 cf 2c 09 57 17 98 70 42 02 6e e6 2c 74 c5
4c ff d5 d7 d5 7e fb bf 95 0a 0f 5c 57 4f a0 9d
3f c1 c9 f5 13 b0 5b 4f f5 0d d8 df 7e df a2 01
02 85 4c 35 e5 92 18 01 19 a7 0c e5 b0 85 18 2a
a0 2d 9e a2 aa 90 d1 df 03 f2 da ae 88 5b a2 f5
d0 5a fd ac 97 47 6f 06 b9 3b 5b c9 4a 1a 80 aa
91 16 c4 d6 15 f3 33 b0 98 89 2b 25 ff ac e2 66
f5 db 5a 5a 3b cc 10 a8 24 ed 55 aa d3 5b 72 78
34 fb 8c 07 da 28 fc f4 16 a5 d9 b2 22 4f 1f 8b
44 2b 36 f9 1e 45 6f de a2 d7 cf e3 36 72 68 de
03 07 a4 c7 4e 92 41 59 ed 33 39 3d 5e 06 55 53
1c 77 32 7b 89 82 1b de df 88 01 61 c7 8c d4 19
6b 54 19 f7 ac c3 f1 3e 5e bf 16 1b 6e 7c 67 24
71 6c a3 3b 85 c2 e2 56 40 19 2a c2 85 96 51 d5
0b de 7e b9 76 e5 1c ec 82 8b 98 b6 56 3b 86 bb
# ---------------------------------
# RSASSA-PSS Signature Example 10.4
# ---------------------------------
# Message to be signed:
0b 87 77 c7 f8 39 ba f0 a6 4b bb db c5 ce 79 75
5c 57 a2 05 b8 45 c1 74 e2 d2 e9 05 46 a0 89 c4
e6 ec 8a df fa 23 a7 ea 97 ba e6 b6 5d 78 2b 82
db 5d 2b 5a 56 d2 2a 29 a0 5e 7c 44 33 e2 b8 2a
62 1a bb a9 0a dd 05 ce 39 3f c4 8a 84 05 42 45
1a
# Salt:
c7 cd 69 8d 84 b6 51 28 d8 83 5e 3a 8b 1e b0 e0
1c b5 41 ec
# Signature:
34 04 7f f9 6c 4d c0 dc 90 b2 d4 ff 59 a1 a3 61
a4 75 4b 25 5d 2e e0 af 7d 8b f8 7c 9b c9 e7 dd
ee de 33 93 4c 63 ca 1c 0e 3d 26 2c b1 45 ef 93
2a 1f 2c 0a 99 7a a6 a3 4f 8e ae e7 47 7d 82 cc
f0 90 95 a6 b8 ac ad 38 d4 ee c9 fb 7e ab 7a d0
2d a1 d1 1d 8e 54 c1 82 5e 55 bf 58 c2 a2 32 34
b9 02 be 12 4f 9e 90 38 a8 f6 8f a4 5d ab 72 f6
6e 09 45 bf 1d 8b ac c9 04 4c 6f 07 09 8c 9f ce
c5 8a 3a ab 10 0c 80 51 78 15 5f 03 0a 12 4c 45
0e 5a cb da 47 d0 e4 f1 0b 80 a2 3f 80 3e 77 4d
02 3b 00 15 c2 0b 9f 9b be 7c 91 29 63 38 d5 ec
b4 71 ca fb 03 20 07 b6 7a 60 be 5f 69 50 4a 9f
01 ab b3 cb 46 7b 26 0e 2b ce 86 0b e8 d9 5b f9
2c 0c 8e 14 96 ed 1e 52 85 93 a4 ab b6 df 46 2d
de 8a 09 68 df fe 46 83 11 68 57 a2 32 f5 eb f6
c8 5b e2 38 74 5a d0 f3 8f 76 7a 5f db f4 86 fb
# ---------------------------------
# RSASSA-PSS Signature Example 10.5
# ---------------------------------
# Message to be signed:
f1 03 6e 00 8e 71 e9 64 da dc 92 19 ed 30 e1 7f
06 b4 b6 8a 95 5c 16 b3 12 b1 ed df 02 8b 74 97
6b ed 6b 3f 6a 63 d4 e7 78 59 24 3c 9c cc dc 98
01 65 23 ab b0 24 83 b3 55 91 c3 3a ad 81 21 3b
b7 c7 bb 1a 47 0a ab c1 0d 44 25 6c 4d 45 59 d9
16
# Salt:
ef a8 bf f9 62 12 b2 f4 a3 f3 71 a1 0d 57 41 52
65 5f 5d fb
# Signature:
7e 09 35 ea 18 f4 d6 c1 d1 7c e8 2e b2 b3 83 6c
55 b3 84 58 9c e1 9d fe 74 33 63 ac 99 48 d1 f3
46 b7 bf dd fe 92 ef d7 8a db 21 fa ef c8 9a de
42 b1 0f 37 40 03 fe 12 2e 67 42 9a 1c b8 cb d1
f8 d9 01 45 64 c4 4d 12 01 16 f4 99 0f 1a 6e 38
77 4c 19 4b d1 b8 21 32 86 b0 77 b0 49 9d 2e 7b
3f 43 4a b1 22 89 c5 56 68 4d ee d7 81 31 93 4b
b3 dd 65 37 23 6f 7c 6f 3d cb 09 d4 76 be 07 72
1e 37 e1 ce ed 9b 2f 7b 40 68 87 bd 53 15 73 05
e1 c8 b4 f8 4d 73 3b c1 e1 86 fe 06 cc 59 b6 ed
b8 f4 bd 7f fe fd f4 f7 ba 9c fb 9d 57 06 89 b5
a1 a4 10 9a 74 6a 69 08 93 db 37 99 25 5a 0c b9
21 5d 2d 1c d4 90 59 0e 95 2e 8c 87 86 aa 00 11
26 52 52 47 0c 04 1d fb c3 ee c7 c3 cb f7 1c 24
86 9d 11 5c 0c b4 a9 56 f5 6d 53 0b 80 ab 58 9a
cf ef c6 90 75 1d df 36 e8 d3 83 f8 3c ed d2 cc
# ---------------------------------
# RSASSA-PSS Signature Example 10.6
# ---------------------------------
# Message to be signed:
25 f1 08 95 a8 77 16 c1 37 45 0b b9 51 9d fa a1
f2 07 fa a9 42 ea 88 ab f7 1e 9c 17 98 00 85 b5
55 ae ba b7 62 64 ae 2a 3a b9 3c 2d 12 98 11 91
dd ac 6f b5 94 9e b3 6a ee 3c 5d a9 40 f0 07 52
c9 16 d9 46 08 fa 7d 97 ba 6a 29 15 b6 88 f2 03
23 d4 e9 d9 68 01 d8 9a 72 ab 58 92 dc 21 17 c0
74 34 fc f9 72 e0 58 cf 8c 41 ca 4b 4f f5 54 f7
d5 06 8a d3 15 5f ce d0 f3 12 5b c0 4f 91 93 37
8a 8f 5c 4c 3b 8c b4 dd 6d 1c c6 9d 30 ec ca 6e
aa 51 e3 6a 05 73 0e 9e 34 2e 85 5b af 09 9d ef
b8 af d7
# Salt:
ad 8b 15 23 70 36 46 22 4b 66 0b 55 08 85 91 7c
a2 d1 df 28
# Signature:
6d 3b 5b 87 f6 7e a6 57 af 21 f7 54 41 97 7d 21
80 f9 1b 2c 5f 69 2d e8 29 55 69 6a 68 67 30 d9
b9 77 8d 97 07 58 cc b2 60 71 c2 20 9f fb d6 12
5b e2 e9 6e a8 1b 67 cb 9b 93 08 23 9f da 17 f7
b2 b6 4e cd a0 96 b6 b9 35 64 0a 5a 1c b4 2a 91
55 b1 c9 ef 7a 63 3a 02 c5 9f 0d 6e e5 9b 85 2c
43 b3 50 29 e7 3c 94 0f f0 41 0e 8f 11 4e ed 46
bb d0 fa e1 65 e4 2b e2 52 8a 40 1c 3b 28 fd 81
8e f3 23 2d ca 9f 4d 2a 0f 51 66 ec 59 c4 23 96
d6 c1 1d bc 12 15 a5 6f a1 71 69 db 95 75 34 3e
f3 4f 9d e3 2a 49 cd c3 17 49 22 f2 29 c2 3e 18
e4 5d f9 35 31 19 ec 43 19 ce dc e7 a1 7c 64 08
8c 1f 6f 52 be 29 63 41 00 b3 91 9d 38 f3 d1 ed
94 e6 89 1e 66 a7 3b 8f b8 49 f5 87 4d f5 94 59
e2 98 c7 bb ce 2e ee 78 2a 19 5a a6 6f e2 d0 73
2b 25 e5 95 f5 7d 3e 06 1b 1f c3 e4 06 3b f9 8f
-}
doSignTest key (i, vector) = testCase (show i) (Right (signature vector) @=? actual) doSignTest key (i, vector) = testCase (show i) (Right (signature vector) @=? actual)
where actual = PSS.signWithSalt (salt vector) Nothing PSS.defaultPSSParamsSHA1 key (message vector) where actual = PSS.signWithSalt (salt vector) Nothing PSS.defaultPSSParamsSHA1 key (message vector)
@ -470,4 +339,10 @@ pssTests = testGroup "RSA-PSS"
[ doVerifyTest rsaKeyInt (katZero, vectorInt) ] [ doVerifyTest rsaKeyInt (katZero, vectorInt) ]
, testGroup "signature key 1024" $ map (doSignTest rsaKey1) (zip [katZero..] vectorsKey1) , testGroup "signature key 1024" $ map (doSignTest rsaKey1) (zip [katZero..] vectorsKey1)
, testGroup "verify key 1024" $ map (doVerifyTest rsaKey1) (zip [katZero..] vectorsKey1) , testGroup "verify key 1024" $ map (doVerifyTest rsaKey1) (zip [katZero..] vectorsKey1)
, testGroup "signature key 1025" $ map (doSignTest rsaKey2) (zip [katZero..] vectorsKey2)
, testGroup "verify key 1025" $ map (doVerifyTest rsaKey2) (zip [katZero..] vectorsKey2)
, testGroup "signature key 1026" $ map (doSignTest rsaKey3) (zip [katZero..] vectorsKey3)
, testGroup "verify key 1026" $ map (doVerifyTest rsaKey3) (zip [katZero..] vectorsKey3)
, testGroup "signature key 1031" $ map (doSignTest rsaKey8) (zip [katZero..] vectorsKey8)
, testGroup "verify key 1031" $ map (doVerifyTest rsaKey8) (zip [katZero..] vectorsKey8)
] ]