Safe Haskell | None |
---|
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.
- data REP__Settings = REP__Settings {
- _stgs_json :: !Value
- data REP__Safeguard = REP__Safeguard {}
- data REP__PublicKey = REP__PublicKey {}
- data REP__PrivateKey = REP__PrivateKey {}
- data Cipher
- = CPH_aes128
- | CPH_aes192
- | CPH_aes256
- data HashPRF
- = PRF_sha1
- | PRF_sha256
- | PRF_sha512
- newtype FragmentID = FragmentID {
- _FragmentID :: Text
- newtype REP__Pattern = REP__Pattern {}
- newtype Iterations = Iterations {
- _Iterations :: Int
- newtype Octets = Octets {}
- newtype REP__Name = REP__Name {
- _REP__Name :: Text
- newtype Identity = Identity {}
- newtype SettingID = SettingID {
- _SettingID :: Text
- data TextJsonAssoc = TextJsonAssoc {}
- newtype TriggerID = TriggerID {
- _TriggerID :: Text
- newtype Comment = Comment {}
- newtype EnvVar = EnvVar {}
- newtype ClearText = ClearText {
- _ClearText :: Binary
- newtype Salt = Salt {}
- data HashDescription = HashDescription {}
- newtype IV = IV {}
- newtype HashData = HashData {}
- data Hash = Hash {}
- newtype AESKey = AESKey {}
- newtype SecretData = SecretData {}
- data AESSecretData = AESSecretData {
- _asd_iv :: !IV
- _asd_secret_data :: !SecretData
- newtype RSAEncryptedKey = RSAEncryptedKey {}
- data RSASecretData = RSASecretData {}
- newtype RSASecretBytes = RSASecretBytes {}
- newtype RSASignature = RSASignature {}
- newtype EncryptionPacket = EncryptionPacket {}
- newtype SignaturePacket = SignaturePacket {}
- newtype Void = Void {}
- data EncryptionKey
- = EK_public !PublicKey
- | EK_private !PrivateKey
- | EK_symmetric !AESKey
- | EK_none !Void
- data EncrypedCopyData
- = ECD_rsa !RSASecretData
- | ECD_aes !AESSecretData
- | ECD_clear !ClearText
- | ECD_no_data !Void
- data EncrypedCopy = EncrypedCopy {
- _ec_safeguard :: !Safeguard
- _ec_cipher :: !Cipher
- _ec_prf :: !HashPRF
- _ec_iterations :: !Iterations
- _ec_salt :: !Salt
- _ec_secret_data :: !EncrypedCopyData
- data REP__EncrypedCopyMap = REP__EncrypedCopyMap {
- _ecm_map :: ![EncrypedCopy]
- data Trigger = Trigger {
- _trg_id :: !TriggerID
- _trg_pattern :: !Pattern
- _trg_settings :: !Settings
- data REP__TriggerMap = REP__TriggerMap {}
- data Configuration = Configuration {}
- data Key = Key {
- _key_name :: !Name
- _key_comment :: !Comment
- _key_identity :: !Identity
- _key_is_binary :: !Bool
- _key_env_var :: !(Maybe EnvVar)
- _key_hash :: !(Maybe Hash)
- _key_public :: !(Maybe PublicKey)
- _key_secret_copies :: !EncrypedCopyMap
- _key_clear_text :: !(Maybe ClearText)
- _key_clear_private :: !(Maybe PrivateKey)
- _key_created_at :: !UTCTime
- data KeyStore = KeyStore {
- _ks_config :: !Configuration
- _ks_keymap :: !KeyMap
- data NameKeyAssoc = NameKeyAssoc {}
- data REP__KeyMap = REP__KeyMap {
- _kmp_map :: ![NameKeyAssoc]
- data Pattern = Pattern {
- _pat_string :: String
- _pat_regex :: Regex
- pattern :: String -> Pattern
- inj_pattern :: REP__Pattern -> ParserWithErrs Pattern
- prj_pattern :: Pattern -> REP__Pattern
- type TriggerMap = Map TriggerID Trigger
- inj_trigger_map :: REP__TriggerMap -> ParserWithErrs TriggerMap
- prj_trigger_map :: TriggerMap -> REP__TriggerMap
- newtype Settings = Settings {}
- inj_settings :: REP__Settings -> ParserWithErrs Settings
- prj_settings :: Settings -> REP__Settings
- defaultSettings :: Settings
- checkSettingsCollisions :: Settings -> [SettingID]
- marker :: Value
- type KeyMap = Map Name Key
- inj_keymap :: REP__KeyMap -> ParserWithErrs KeyMap
- prj_keymap :: KeyMap -> REP__KeyMap
- emptyKeyStore :: Configuration -> KeyStore
- emptyKeyMap :: KeyMap
- type EncrypedCopyMap = Map Safeguard EncrypedCopy
- inj_encrypted_copy_map :: REP__EncrypedCopyMap -> ParserWithErrs EncrypedCopyMap
- prj_encrypted_copy_map :: EncrypedCopyMap -> REP__EncrypedCopyMap
- defaultConfiguration :: Settings -> Configuration
- inj_safeguard :: REP__Safeguard -> ParserWithErrs Safeguard
- prj_safeguard :: Safeguard -> REP__Safeguard
- inj_name :: REP__Name -> ParserWithErrs Name
- prj_name :: Name -> REP__Name
- inj_PublicKey :: REP__PublicKey -> ParserWithErrs PublicKey
- prj_PublicKey :: PublicKey -> REP__PublicKey
- inj_PrivateKey :: REP__PrivateKey -> ParserWithErrs PrivateKey
- prj_PrivateKey :: PrivateKey -> REP__PrivateKey
- e2p :: E a -> ParserWithErrs a
- data Dirctn
- = Encrypting
- | Decrypting
- pbkdf :: HashPRF -> ClearText -> Salt -> Iterations -> Octets -> (ByteString -> a) -> a
- keyWidth :: Cipher -> Octets
- void_ :: Void
- map_from_list :: Ord a => String -> (c -> [b]) -> (b -> a) -> (a -> Text) -> c -> ParserWithErrs (Map a b)
- void :: Iso' Void Int
- signaturePacket :: Iso' SignaturePacket Binary
- encryptionPacket :: Iso' EncryptionPacket Binary
- rSASignature :: Iso' RSASignature Binary
- rSASecretBytes :: Iso' RSASecretBytes Binary
- rSAEncryptedKey :: Iso' RSAEncryptedKey Binary
- secretData :: Iso' SecretData Binary
- aESKey :: Iso' AESKey Binary
- hashData :: Iso' HashData Binary
- iV :: Iso' IV Binary
- salt :: Iso' Salt Binary
- clearText :: Iso' ClearText Binary
- envVar :: Iso' EnvVar Text
- comment :: Iso' Comment Text
- triggerID :: Iso' TriggerID Text
- settingID :: Iso' SettingID Text
- identity :: Iso' Identity Text
- rEP__Name :: Iso' REP__Name Text
- octets :: Iso' Octets Int
- iterations :: Iso' Iterations Int
- rEP__Pattern :: Iso' REP__Pattern Text
- fragmentID :: Iso' FragmentID Text
- prk_qinv :: Lens' REP__PrivateKey Integer
- prk_q :: Lens' REP__PrivateKey Integer
- prk_pub :: Lens' REP__PrivateKey PublicKey
- prk_p :: Lens' REP__PrivateKey Integer
- prk_dQ :: Lens' REP__PrivateKey Integer
- prk_dP :: Lens' REP__PrivateKey Integer
- prk_d :: Lens' REP__PrivateKey Integer
- puk_size :: Lens' REP__PublicKey Int
- puk_n :: Lens' REP__PublicKey Integer
- puk_e :: Lens' REP__PublicKey Integer
- asd_secret_data :: Lens' AESSecretData SecretData
- asd_iv :: Lens' AESSecretData IV
- rsd_encrypted_key :: Lens' RSASecretData RSAEncryptedKey
- rsd_aes_secret_data :: Lens' RSASecretData AESSecretData
- sg_names :: Iso' REP__Safeguard [Name]
- ec_secret_data :: Lens' EncrypedCopy EncrypedCopyData
- ec_salt :: Lens' EncrypedCopy Salt
- ec_safeguard :: Lens' EncrypedCopy Safeguard
- ec_prf :: Lens' EncrypedCopy HashPRF
- ec_iterations :: Lens' EncrypedCopy Iterations
- ec_cipher :: Lens' EncrypedCopy Cipher
- ecm_map :: Iso' REP__EncrypedCopyMap [EncrypedCopy]
- hashd_width_octets :: Lens' HashDescription Octets
- hashd_salt_octets :: Lens' HashDescription Octets
- hashd_salt :: Lens' HashDescription Salt
- hashd_prf :: Lens' HashDescription HashPRF
- hashd_iterations :: Lens' HashDescription Iterations
- hashd_comment :: Lens' HashDescription Comment
- hash_hash :: Lens' Hash HashData
- hash_description :: Lens' Hash HashDescription
- key_secret_copies :: Lens' Key EncrypedCopyMap
- key_public :: Lens' Key (Maybe PublicKey)
- key_name :: Lens' Key Name
- key_is_binary :: Lens' Key Bool
- key_identity :: Lens' Key Identity
- key_hash :: Lens' Key (Maybe Hash)
- key_env_var :: Lens' Key (Maybe EnvVar)
- key_created_at :: Lens' Key UTCTime
- key_comment :: Lens' Key Comment
- key_clear_text :: Lens' Key (Maybe ClearText)
- key_clear_private :: Lens' Key (Maybe PrivateKey)
- nka_name :: Lens' NameKeyAssoc Name
- nka_key :: Lens' NameKeyAssoc Key
- kmp_map :: Iso' REP__KeyMap [NameKeyAssoc]
- tja_key :: Lens' TextJsonAssoc Value
- tja_id :: Lens' TextJsonAssoc SettingID
- stgs_json :: Iso' REP__Settings Value
- trg_settings :: Lens' Trigger Settings
- trg_pattern :: Lens' Trigger Pattern
- trg_id :: Lens' Trigger TriggerID
- tmp_map :: Iso' REP__TriggerMap [Trigger]
- cfg_triggers :: Lens' Configuration TriggerMap
- cfg_settings :: Lens' Configuration Settings
- ks_keymap :: Lens' KeyStore KeyMap
- ks_config :: Lens' KeyStore Configuration
- _map_HashPRF :: Map Text HashPRF
- _text_HashPRF :: HashPRF -> Text
- _map_Cipher :: Map Text Cipher
- _text_Cipher :: Cipher -> Text
- module Data.KeyStore.Types.NameAndSafeguard
- module Data.KeyStore.Types.E
- data PublicKey = PublicKey {}
- data PrivateKey = PrivateKey {}
Documentation
data REP__Settings Source
data REP__PublicKey Source
newtype FragmentID Source
newtype REP__Pattern Source
newtype Iterations Source
data HashDescription Source
HashDescription | |
|
newtype SecretData Source
data AESSecretData Source
AESSecretData | |
|
newtype RSAEncryptedKey Source
data RSASecretData Source
newtype RSASecretBytes Source
newtype RSASignature Source
newtype EncryptionPacket Source
newtype SignaturePacket Source
data EncryptionKey Source
data EncrypedCopyData Source
data EncrypedCopy Source
EncrypedCopy | |
|
Trigger | |
|
data Configuration Source
Key | |
|
KeyStore | |
|
data REP__KeyMap Source
REP__KeyMap | |
|
Keystore session context, created at the start of a session and passed to the keystore access functions.
Pattern | |
|
type TriggerMap = Map TriggerID TriggerSource
e2p :: E a -> ParserWithErrs aSource
pbkdf :: HashPRF -> ClearText -> Salt -> Iterations -> Octets -> (ByteString -> a) -> aSource
map_from_list :: Ord a => String -> (c -> [b]) -> (b -> a) -> (a -> Text) -> c -> ParserWithErrs (Map a b)Source
_text_HashPRF :: HashPRF -> TextSource
_text_Cipher :: Cipher -> TextSource
module Data.KeyStore.Types.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.
PrivateKey | |
|