License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | Good |
Safe Haskell | None |
Language | Haskell98 |
- data PSSParams = PSSParams {}
- defaultPSSParams :: HashFunction -> PSSParams
- defaultPSSParamsSHA1 :: PSSParams
- signWithSalt :: ByteString -> Maybe Blinder -> PSSParams -> PrivateKey -> ByteString -> Either Error ByteString
- sign :: CPRG g => g -> Maybe Blinder -> PSSParams -> PrivateKey -> ByteString -> (Either Error ByteString, g)
- signSafer :: CPRG g => g -> PSSParams -> PrivateKey -> ByteString -> (Either Error ByteString, g)
- verify :: PSSParams -> PublicKey -> ByteString -> ByteString -> Bool
Documentation
Parameters for PSS signature/verification.
PSSParams | |
|
defaultPSSParams :: HashFunction -> PSSParams Source
Default Params with a specified hash function
defaultPSSParamsSHA1 :: PSSParams Source
Default Params using SHA1 algorithm.
Sign and verify functions
:: ByteString | Salt to use |
-> Maybe Blinder | optional blinder to use |
-> PSSParams | PSS Parameters to use |
-> PrivateKey | RSA Private Key |
-> ByteString | Message to sign |
-> Either Error ByteString |
Sign using the PSS parameters and the salt explicitely passed as parameters.
the function ignore SaltLength from the PSS Parameters
:: CPRG g | |
=> g | random generator to use to generate the salt |
-> Maybe Blinder | optional blinder to use |
-> PSSParams | PSS Parameters to use |
-> PrivateKey | RSA Private Key |
-> ByteString | Message to sign |
-> (Either Error ByteString, g) |
Sign using the PSS Parameters
:: CPRG g | |
=> g | random generator |
-> PSSParams | PSS Parameters to use |
-> PrivateKey | private key |
-> ByteString | message to sign |
-> (Either Error ByteString, g) |
Sign using the PSS Parameters and an automatically generated blinder.
:: PSSParams | PSS Parameters to use to verify, this need to be identical to the parameters when signing |
-> PublicKey | RSA Public Key |
-> ByteString | Message to verify |
-> ByteString | Signature |
-> Bool |
Verify a signature using the PSS Parameters