tahoe-chk-0.2.0.0: The Tahoe-LAFS' Content-Hash-Key (CHK) cryptographic protocol.
Safe HaskellNone
LanguageHaskell2010

Tahoe.CHK.Validate

Synopsis

Documentation

validFingerprint :: Verifier -> Share -> Bool Source #

Determine the validity of the given share's fingerprint as defined by the given capability.

matchingCrypttextHashRoot :: Share -> Bool Source #

True if the root of the crypttext hash tree in the share matches the crypttext hash root given in the URI extension block. False otherwise.

matchingBlockHashRoot :: Int -> Share -> Bool Source #

True if the share's own hash in the shareNeededHashes list equals the root of the share's block hash merkle tree, False otherwise.

validShareRootHash :: [(Int, Share)] -> [Bool] Source #

Determine the validity of each of the given shares' "share root hash" values with respect to the other shares in the list.

showHashes :: (Show a, Show b) => [(a, b)] -> String Source #

showHash :: (Show a, Show b) => (a, b) -> String Source #

shareValidBlocks :: Share -> [Maybe ByteString] Source #

Get only and all the blocks from the given share with hashes that match the values in the Share's "block hash tree".

validSegment :: Digest' SHA256d -> Crypttext -> Maybe Crypttext Source #

Compare the hash of one segment to an expected hash value and return Nothing if it does not match or Just the segment if it does.

validSegments :: [Digest' SHA256d] -> [Crypttext] -> [Maybe Crypttext] Source #

Apply validSegment to lists of values.