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

Safe HaskellNone
LanguageHaskell2010

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 # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

Methods

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

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

Ord Crv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

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 # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

Methods

showsPrec :: Int -> Crv -> ShowS #

show :: Crv -> String #

showList :: [Crv] -> ShowS #

Arbitrary Crv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

Methods

arbitrary :: Gen Crv #

shrink :: Crv -> [Crv] #

ToJSON Crv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

FromJSON Crv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

Parameters for RSA Keys

data RSAPrivateKeyOptionalParameters Source #

Optional parameters for RSA private keys

Parameters for Symmetric Keys

Parameters for CFRG EC keys (RFC 8037)

data OKPCrv Source #

Constructors

Ed25519 
X25519 
Instances
Eq OKPCrv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

Methods

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

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

Show OKPCrv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

Arbitrary OKPCrv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

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