jose-0.9: JSON Object Signing and Encryption (JOSE) and JSON Web Token (JWT) library
Safe HaskellNone
LanguageHaskell2010

Crypto.JOSE.JWA.JWK

Description

Cryptographic Algorithms for Keys.

Synopsis

Type classes

class AsPublicKey k where Source #

Keys that may have have public material

Methods

asPublicKey :: Getter k (Maybe k) Source #

Get the public key

Parameters for Elliptic Curve Keys

data Crv Source #

"crv" (Curve) Parameter

Constructors

P_256 
P_384 
P_521 

Instances

Instances details
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

Instances details
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