keystore-0.5.0.2: Managing stores of secret things

Safe HaskellNone

Data.KeyStore.Types

Description

The KeyStore and Associated Types

Note that most of these types and functions were generated by the api-tools (Data.Api.Tools) from the schema in Data.KeyStore.Types.Schema, marked down in https://github.com/cdornan/keystore/blob/master/schema.md.

Synopsis

Documentation

newtype Salt Source

Constructors

Salt 

Fields

_Salt :: Binary
 

newtype IV Source

Constructors

IV 

Fields

_IV :: Binary
 

newtype Void Source

Constructors

Void 

Fields

_Void :: Int
 

data Pattern Source

Keystore session context, created at the start of a session and passed to the keystore access functions.

Constructors

Pattern 

data Dirctn Source

Constructors

Encrypting 
Decrypting 

Instances

map_from_list :: Ord a => String -> (c -> [b]) -> (b -> a) -> (a -> Text) -> c -> ParserWithErrs (Map a b)Source

data PublicKey

Represent a RSA public key

Constructors

PublicKey 

Fields

public_size :: Int

size of key in bytes

public_n :: Integer

public p*q

public_e :: Integer

public exponant e

data PrivateKey

Represent a RSA private key.

Only the pub, d fields are mandatory to fill.

p, q, dP, dQ, qinv are by-product during RSA generation, but are useful to record here to speed up massively the decrypt and sign operation.

implementations can leave optional fields to 0.

Constructors

PrivateKey 

Fields

private_pub :: PublicKey

public part of a private key (size, n and e)

private_d :: Integer

private exponant d

private_p :: Integer

p prime number

private_q :: Integer

q prime number

private_dP :: Integer

d mod (p-1)

private_dQ :: Integer

d mod (q-1)

private_qinv :: Integer

q^(-1) mod p