cryptonite-0.27: Cryptography Primitives sink
License BSD-style
Maintainer Vincent Hanquez <vincent@snarc.org>
Stability experimental
Portability unknown
Safe Haskell None
Language Haskell2010

Crypto.Data.AFIS

Description

Haskell implementation of the Anti-forensic information splitter available in LUKS. http://clemens.endorphin.org/AFsplitter

The algorithm bloats an arbitrary secret with many bits that are necessary for the recovery of the key (merge), and allow greater way to permanently destroy a key stored on disk.

Synopsis

Documentation

split Source #

Arguments

:: ( ByteArray ba, HashAlgorithm hash, DRG rng)
=> hash

Hash algorithm to use as diffuser

-> rng

Random generator to use

-> Int

Number of times to diffuse the data.

-> ba

original data to diffuse.

-> (ba, rng)

The diffused data

Split data to diffused data, using a random generator and an hash algorithm.

the diffused data will consist of random data for (expandTimes-1) then the last block will be xor of the accumulated random data diffused by the hash algorithm.

  • ---------
  • orig -
  • ---------
  • --------- ---------- --------------
  • rand1 - - rand2 - - orig ^ acc -
  • --------- ---------- --------------

where acc is : acc(n+1) = hash (n ++ rand(n)) ^ acc(n)

merge Source #

Arguments

:: ( ByteArray ba, HashAlgorithm hash)
=> hash

Hash algorithm used as diffuser

-> Int

Number of times to un-diffuse the data

-> ba

Diffused data

-> ba

Original data

Merge previously diffused data back to the original data.