Portability | unknown |
---|---|

Stability | experimental |

Maintainer | Vincent Hanquez <vincent@snarc.org> |

Safe Haskell | None |

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.

- split :: (HashAlgorithm a, CPRG rng) => HashFunctionBS a -> rng -> Int -> ByteString -> (ByteString, rng)
- merge :: HashAlgorithm a => HashFunctionBS a -> Int -> ByteString -> ByteString

# Documentation

:: (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)

:: 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.