From 4554d2227fbfaca41d1c9bd70c7135ebe78c555f Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Fri, 12 May 2023 15:06:47 -0400
Subject: [PATCH] comments

---
 src/Tahoe/SDMF/Internal/Keys.hs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/Tahoe/SDMF/Internal/Keys.hs b/src/Tahoe/SDMF/Internal/Keys.hs
index 4ba23fe..e40d6fb 100644
--- a/src/Tahoe/SDMF/Internal/Keys.hs
+++ b/src/Tahoe/SDMF/Internal/Keys.hs
@@ -1,4 +1,7 @@
--- | Key types, derivations, and related functionality for SDMF.
+{- | Key types, derivations, and related functionality for SDMF.
+
+ See docs/specifications/mutable.rst for details.
+-}
 module Tahoe.SDMF.Internal.Keys where
 
 import Prelude hiding (Read)
@@ -94,7 +97,8 @@ deriveDataKey :: SDMF_IV -> Read -> Maybe Data
 deriveDataKey (SDMF_IV iv) r =
     Data <$> key <*> pure (ByteArray.convert sbs)
   where
-    -- XXX taggedPairHash has a bug where it doesn't ever truncate.
+    -- XXX taggedPairHash has a bug where it doesn't ever truncate so we
+    -- truncate for it.
     sbs = B.take keyLength . taggedPairHash keyLength mutableDataKeyTag (B.pack . ByteArray.unpack $ iv) . ByteArray.convert . readKeyBytes $ r
     key = maybeCryptoError . cipherInit $ sbs
 
-- 
GitLab