jose-0.7.0.0: Javascript Object Signing and Encryption and JSON Web Token library

Safe HaskellNone
LanguageHaskell98

Crypto.JOSE.JWA.JWK

Contents

Description

Cryptographic Algorithms for Keys.

Synopsis

Type classes

Parameters for Elliptic Curve Keys

data Crv Source #

"crv" (Curve) Parameter

Constructors

P_256 
P_384 
P_521 

Instances

Eq Crv Source # 

Methods

(==) :: Crv -> Crv -> Bool #

(/=) :: Crv -> Crv -> Bool #

Ord Crv Source # 

Methods

compare :: Crv -> Crv -> Ordering #

(<) :: Crv -> Crv -> Bool #

(<=) :: Crv -> Crv -> Bool #

(>) :: Crv -> Crv -> Bool #

(>=) :: Crv -> Crv -> Bool #

max :: Crv -> Crv -> Crv #

min :: Crv -> Crv -> Crv #

Show Crv Source # 

Methods

showsPrec :: Int -> Crv -> ShowS #

show :: Crv -> String #

showList :: [Crv] -> ShowS #

Arbitrary Crv Source # 

Methods

arbitrary :: Gen Crv #

shrink :: Crv -> [Crv] #

ToJSON Crv Source # 

Methods

toJSON :: Crv -> Value #

toEncoding :: Crv -> Encoding #

FromJSON Crv Source # 

Methods

parseJSON :: Value -> Parser Crv #

Parameters for RSA Keys

Parameters for Symmetric Keys

Parameters for CFRG EC keys (RFC 8037)

Key generation

data KeyMaterialGenParam Source #

Keygen parameters.

Constructors

ECGenParam Crv

Generate an EC key with specified curve.

RSAGenParam Int

Generate an RSA key with specified size in bytes.

OctGenParam Int

Generate a symmetric key with specified size in bytes.

OKPGenParam OKPCrv

Generate an EdDSA or Edwards ECDH key with specified curve.

Signing and verification