Portability | portable |
---|---|
Stability | beta |
Maintainer | Thomas.DuBuisson@gmail.com |
Safe Haskell | Safe-Inferred |
NIST KAT files are composed of properties, such as:
[SHA-1] [PredictionResistance = True] [EntropyInputSize = 128]
and individual known answer tests using these properties, ex:
COUNT = 0 EntropyInput = 7 PersonalizationString = Result = 8 COUNT = 1 EntropyInput = 4 PersonalizationString = Result = 2
Using 'many parseCategory' this input would be converted to a
single element list of TestCategory
:
[([("SHA-1",""), ("PredictionResistance", "True"), ("EntropyInputSize", "128")], [ [("COUNT", "0"), ("EntropyInput", "7"), ("PersonalizationString", ""), ("Result", "8")], , [("COUNT", "1"), ("EntropyInput", "4"), ("PersonalizationString", ""), ("Result", "2")]])]
that is, a list of tuples, the first element is a list of properties (key/value pairs) and the second element is a list of tests. Each test is itself a list of records (key/value pairs). Properties apply to all tests contained in the second element of the tuple.
Documentation
parseCategories :: String -> String -> [(Properties, [NistTest])]Source
type Properties = [(String, String)]Source
type TestCategory = (Properties, [NistTest])Source