| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Conduit.OpenPGP.Decrypt
Synopsis
- conduitDecrypt :: forall (m :: Type -> Type). (MonadFail m, MonadUnliftIO m, MonadResource m, MonadThrow m) => DecryptOptions -> ConduitT Pkt Pkt m DecryptOutcome
- conduitDecryptWithReport :: forall (m :: Type -> Type). (MonadFail m, MonadUnliftIO m, MonadResource m, MonadThrow m) => DecryptOptions -> ConduitT Pkt Pkt m DecryptReport
- data DecryptOptions = DecryptOptions {}
- data DecryptKeyResolution
- data PKESKRecipientKey = PKESKRecipientKey {}
- data PKESKAttemptFailureKind
- data PKESKAttemptFailure = PKESKAttemptFailure {}
- data DecryptOutcome
- data DecryptReport = DecryptReport {}
- data DecryptSessionKeyResolutionReport = DecryptSessionKeyResolutionReport {}
- data DecryptSessionKeyResolutionPath
- data PKESKResolverAttempt = PKESKResolverAttempt {}
- data PKESKResolverAttemptAction
- = ResolverAttemptResolveWith (Maybe (KeyVersion, PubKeyAlgorithm))
- | ResolverAttemptSkip
- | ResolverAttemptExhausted
- | ResolverAttemptFail PKESKResolverError
- decryptSEIPDv2Payload :: SymmetricAlgorithm -> AEADAlgorithm -> Word8 -> Salt -> ByteString -> SessionKey -> Either String ByteString
Documentation
conduitDecrypt :: forall (m :: Type -> Type). (MonadFail m, MonadUnliftIO m, MonadResource m, MonadThrow m) => DecryptOptions -> ConduitT Pkt Pkt m DecryptOutcome Source #
conduitDecryptWithReport :: forall (m :: Type -> Type). (MonadFail m, MonadUnliftIO m, MonadResource m, MonadThrow m) => DecryptOptions -> ConduitT Pkt Pkt m DecryptReport Source #
data DecryptOptions Source #
Canonical decrypt configuration.
Most callers should prefer conduitDecrypt and set:
decryptOptionsKeyResolutiontoDecryptWithKeyringorDecryptWithKeyringAndPassphrasedecryptOptionsPolicyto strict (defaultDecryptPolicy) or lenientdecryptOptionsPassphraseCallbackfor SKESK passphrase lookup
Constructors
| DecryptOptions | |
Fields | |
data DecryptKeyResolution Source #
Build a stateful PKESKResolver that iterates over a pre-populated
candidate list. The returned resolver yields candidates in order and
returns ResolveExhausted once the list is depleted.
| How to resolve secret keys for PKESK-encrypted messages.
Constructors
| DecryptWithoutPKESK | Do not attempt PKESK decryption; fall through to manual session-key input via the passphrase callback instead. |
| DecryptWithKeyring SecretKeyring | Resolve secret keys from a |
| DecryptWithKeyringAndPassphrase SecretKeyring (SomePKPayload -> IO (Maybe ByteString)) | Resolve secret keys from a |
| DecryptWithUnwrapCandidatesCallback (KeyIdentifier -> PubKeyAlgorithm -> IO [PKESKRecipientKey]) | Preferred callback form for non-keyring key material. The callback receives a typed key identifier (8-octet key ID, fingerprint, or wildcard) plus the packet public-key algorithm, then returns all matching candidates in priority order. hOpenPGP iterates candidates deterministically without re-calling the callback for each retry. |
data PKESKRecipientKey Source #
Constructors
| PKESKRecipientKey | |
Fields
| |
data PKESKAttemptFailureKind Source #
Instances
| Show PKESKAttemptFailureKind Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt | |
| Eq PKESKAttemptFailureKind Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt Methods (==) :: PKESKAttemptFailureKind -> PKESKAttemptFailureKind -> Bool Source # (/=) :: PKESKAttemptFailureKind -> PKESKAttemptFailureKind -> Bool Source # | |
data PKESKAttemptFailure Source #
Constructors
| PKESKAttemptFailure | |
Instances
| Show PKESKAttemptFailure Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt | |
| Eq PKESKAttemptFailure Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt Methods (==) :: PKESKAttemptFailure -> PKESKAttemptFailure -> Bool Source # (/=) :: PKESKAttemptFailure -> PKESKAttemptFailure -> Bool Source # | |
data DecryptOutcome Source #
Outcome of a checked decrypt conduit run.
Use conduitDecrypt to obtain this value. Because
.| preserves the
rightmost conduit's return value, callers who also need the decrypted
packet stream should use fuseBoth:
(outcome, pkts) <- runConduit $ source .| fuseBoth (conduitDecrypt opts) CL.consume
Constructors
| DecryptClean | The integrity-terminating marker (MDC or SEIPD v2 final AEAD tag) was seen and no further packets arrived. The message was well-formed end-to-end. |
| DecryptTruncated | The input stream ended before any integrity-terminating marker was seen. The ciphertext was incomplete. |
| DecryptTrailingData | An integrity-terminating marker was seen, but additional packets
followed it. Only possible with |
| DecryptMalformedStructure String | A structural packet-sequencing violation was detected. The
|
Instances
| Show DecryptOutcome Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt | |
| Eq DecryptOutcome Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt Methods (==) :: DecryptOutcome -> DecryptOutcome -> Bool Source # (/=) :: DecryptOutcome -> DecryptOutcome -> Bool Source # | |
data DecryptReport Source #
Constructors
| DecryptReport | |
Instances
| Show DecryptReport Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt | |
| Eq DecryptReport Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt Methods (==) :: DecryptReport -> DecryptReport -> Bool Source # (/=) :: DecryptReport -> DecryptReport -> Bool Source # | |
data DecryptSessionKeyResolutionReport Source #
Constructors
| DecryptSessionKeyResolutionReport | |
Instances
data DecryptSessionKeyResolutionPath Source #
Instances
data PKESKResolverAttempt Source #
Constructors
| PKESKResolverAttempt | |
Fields
| |
Instances
| Show PKESKResolverAttempt Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt | |
| Eq PKESKResolverAttempt Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt Methods (==) :: PKESKResolverAttempt -> PKESKResolverAttempt -> Bool Source # (/=) :: PKESKResolverAttempt -> PKESKResolverAttempt -> Bool Source # | |
data PKESKResolverAttemptAction Source #
Constructors
| ResolverAttemptResolveWith (Maybe (KeyVersion, PubKeyAlgorithm)) | |
| ResolverAttemptSkip | |
| ResolverAttemptExhausted | |
| ResolverAttemptFail PKESKResolverError |
Instances
| Show PKESKResolverAttemptAction Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt | |
| Eq PKESKResolverAttemptAction Source # | |
Defined in Data.Conduit.OpenPGP.Decrypt Methods (==) :: PKESKResolverAttemptAction -> PKESKResolverAttemptAction -> Bool Source # (/=) :: PKESKResolverAttemptAction -> PKESKResolverAttemptAction -> Bool Source # | |
decryptSEIPDv2Payload :: SymmetricAlgorithm -> AEADAlgorithm -> Word8 -> Salt -> ByteString -> SessionKey -> Either String ByteString Source #