Skip to content

Commit 1d17ead

Browse files
committed
some docs for the xchacha20 implementation.
1 parent a95c9a3 commit 1d17ead

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

indef/chacha20/Implementation.hsig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ type BufferAlignment = 32
4141
#endif
4242

4343
-- | The primitive for which the implementation is given
44-
4544
type Prim = ChaCha20
45+
46+
-- | The Internal memory associated with the ChaCha20 implementation.
4647
data Internals
4748
instance Memory Internals
4849

indef/chacha20/XChaCha20/Implementation.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,24 @@ import Raaz.Primitive.ChaCha20.Internal
99

1010
import qualified Implementation as Base
1111

12+
-- | Name of the implementation
1213
name :: String
1314
name = Base.name
1415

16+
-- | Then name of the primitive.
1517
primName :: String
1618
primName = "xchacha20"
1719

20+
-- | A description of what this implementation is about.
1821
description :: String
1922
description = Base.description ++ " This is the XChaCha variant."
2023

24+
-- | The underlying cryptographic primitive is the XChaCha20 cipher.
2125
type Prim = XChaCha20
26+
27+
-- | The internal memory used by XChaCha20 implementation. It consists
28+
-- of a copy of the key and the internals of the associated chaca20
29+
-- implementation.
2230
data Internals = XChaCha20Mem
2331
{ copyOfKey :: MemoryCell (Key ChaCha20)
2432
, chacha20Internals :: Base.Internals

0 commit comments

Comments
 (0)