This commit is contained in:
Gregor Kleen 2017-10-25 23:54:19 +02:00
parent 7684a6d7ac
commit 29c0e9a325
3 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,6 @@
# 0.0.0.2
- Improved documentation
# 0.0.0.1
- Improved documentation

View File

@ -1,5 +1,5 @@
name: filepath-crypto
version: 0.0.0.1
version: 0.0.0.2
synopsis: Reversable and secure encoding of object ids as filepaths
license: BSD3
license-file: LICENSE

View File

@ -23,9 +23,9 @@ guaranteed to cause runtime errors in all cases.
Since the serialized payload is padded to the length of the next cipher block we
can detect namespace mismatches by checking that all bytes expected to have been
inserted during padding are nil.
The probability of detecting a namespace mismatch is thus
\[1 - 2^{b \cdot \left \lceil \frac{l}{b} \right \rceil-l}])
where \(l\) is the length of the serialized payload.
The probability of detecting a namespace mismatch is thus \(1 - 2^{b \left \lceil \frac{l}{b} \right \rceil - l}\)
where \(l\) is the length of the serialized payload and \(b\) the length of a
ciphertext block (both in bits).
-}
module System.FilePath.Cryptographic
( CryptoID(..)