afis-0.1.0: Anti-forensic Information Splitter

Portabilityunknown
Stabilityexperimental
MaintainerVincent Hanquez <vincent@snarc.org>
Safe HaskellNone

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

splitSource

Arguments

:: (HashAlgorithm a, CPRG rng) 
=> HashFunctionBS a

Hash function to use as diffuser

-> rng

Random generator to use

-> Int

Number of times to diffuse the data.

-> ByteString

original data to diffuse.

-> (ByteString, 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)

mergeSource

Arguments

:: HashAlgorithm a 
=> HashFunctionBS a

Hash function used as diffuser

-> Int

Number of times to un-diffuse the data

-> ByteString

Diffused data

-> ByteString

Original data

Merge previously diffused data back to the original data.