Skip to content

Commit e35228c

Browse files
committed
Improve explanation of minSigPopPContext and DST in comments
1 parent 46ce4f2 commit e35228c

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • cardano-api/src/Cardano/Api/Key/Internal

cardano-api/src/Cardano/Api/Key/Internal/Leios.hs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,14 @@ blsPossessionProof hexBs =
190190
Left e -> error $ "blsPossessionProof: " ++ show e
191191
Right p -> p
192192

193-
-- | Proof-of-possession ciphersuite DST for the minimal-signature-size BLS12-381 variant.
193+
-- | Signing context including the Domain Separation Tag (DST) for the proofs-of-possession of
194+
-- BLS keys using the minimal-signature-size BLS12-381 variant.
194195
--
195-
-- It is used when creating and verifying proofs of possession to ensure domain separation
196-
-- between signing contexts.
196+
-- A Domain Separation Tag is a unique tag (like a magic number) that we add to ensure that
197+
-- the signature is used only in the context that it was intended for.
198+
-- This is because BLS keys and signatures can be used for multiple purposes, and
199+
-- we don't want a proof of possession for one purpose to be interpreted as something different
200+
-- in a different context.
197201
minSigPoPContext :: Crypto.BLS12381SignContext
198202
minSigPoPContext = Crypto.BLS12381SignContext (Just minSigPoPDST) Nothing
199203

0 commit comments

Comments
 (0)