From 0fe29f435045f4ed58cd3f3d101efd313e80bebc Mon Sep 17 00:00:00 2001 From: joe Date: Thu, 1 May 2014 00:14:51 -0400 Subject: Document intention for unspilled KeyDB and decryption. --- KeyRing.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/KeyRing.hs b/KeyRing.hs index d3db248..c5c8bf2 100644 --- a/KeyRing.hs +++ b/KeyRing.hs @@ -1666,6 +1666,9 @@ makeMemoizingDecrypter operation ctx = do && isNothing (passSpecKeySpec sp)) $ kPassphrases operation unkeysRef <- newIORef Map.empty + -- TODO: + -- Use buildKeyDB on unspilled files to create an unspillable KeyDB. + -- This KeyDB should be used later by decryptIt. return $ doDecrypt unkeysRef (pws `Map.union` pws2) defpw where doDecrypt :: IORef (Map.Map KeyKey Packet) @@ -1681,6 +1684,9 @@ makeMemoizingDecrypter operation ctx = do decryptIt [] = return BadPassphrase decryptIt (getpw:getpws) = do + -- TODO: This function should use mergeKeyPacket to + -- combine the packet with it's unspilled version before + -- attempting to decrypt it. pw <- getpw let wkun = fromMaybe wk $ decryptSecretKey pw wk case symmetric_algorithm wkun of -- cgit v1.2.3