jose-0.11: JSON Object Signing and Encryption (JOSE) and JSON Web Token (JWT) library
Safe HaskellSafe-Inferred
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 
Secp256k1 

Instances

Instances details
FromJSON Crv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

ToJSON Crv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

Show Crv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

Methods

showsPrec :: Int -> Crv -> ShowS #

show :: Crv -> String #

showList :: [Crv] -> ShowS #

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 #

Parameters for RSA Keys

Parameters for Symmetric Keys

Parameters for CFRG EC keys (RFC 8037)

data OKPCrv Source #

Constructors

Ed25519 
Ed448 
X25519 
X448 

Instances

Instances details
Show OKPCrv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

Eq OKPCrv Source # 
Instance details

Defined in Crypto.JOSE.JWA.JWK

Methods

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

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

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