1Test Data Format 2 3A test data file is an ASCII text file composed of sections separated by 4blank lines. Each section is stand-alone and independent of other 5sections that may be in the same file, and contains one or more tests. 6 7A section is composed of a sequence of fields. Each field is one or more 8lines composed of a field name, followed by a colon (":"), followed by a 9field body. All but the last line of a field must end with a backslash 10("\"). If any line contains a hash mark ("#"), the hash mark and 11everything after it on the same line is not considered part of the field 12body. 13 14Each section must contain fields named AlgorithmType, Name, Source, and 15Test. The presence and semantics of other fields depend on the algorithm 16being tested and the tests to be run. 17 18Each section may contain more than one test and therefore more than one 19field named Test. In that case the order of the fields is significant. A 20test should always use the last field with any given name that occurs 21before the Test field. 22 23Data Types 24 25int - small integer (less than 2^32) in decimal representation 26string - human readable string 27encoded string - can be one of the following 28 - quoted string: "message" means "message" without the quotes 29 or terminating '\0' 30 - hex encoded string: 0x74657374 or 74657374 means "test" 31 - repeated string: r100 "message" to repeat "message" 100 times, or 32 r256 0x0011 to repeat 0x0011 256 times 33 34Field Types 35 36AlgorithmType - string, for example "Signature", "AsymmetricCipher", 37"SymmetricCipher", "MAC", "MessageDigest", or "KeyFactory" 38Name - string, an algorithm name from SCAN 39Test - string, identifies the test to run 40Source - string, text explaining where the test data came from 41Comment - string, other comments about the test data 42KeyFormat - string, specifies the key format. "Component" here means 43each component of the key or key pair is specified separately as a name, 44value pair, with the names depending on the algorithm being tested. 45Otherwise the value names "Key", or "PublicKey" and "PrivateKey" are 46used. 47Key - encoded string 48PublicKey - encoded string 49PrivateKey - encoded string 50Message - encoded string, message to be signed or verified 51Signature - encoded string, signature to be verified or compared 52with 53Plaintext - encoded string 54Ciphertext - encoded string 55Digest - encoded string 56TruncatedSize - int, size of truncated digest in bytes 57Seek - int, seek location for random access ciphers 58(more to come here) 59 60Possible Tests 61 62KeyPairValidAndConsistent - public and private keys are both valid and 63consistent with each other 64PublicKeyInvalid - public key validation should not pass 65PrivateKeyInvalid - private key validation should not pass 66Verify - signature/digest/MAC verification should pass 67VerifyTruncated - truncated digest/MAC verification should pass 68NotVerify - signature/digest/MAC verification should not pass 69DeterministicSign - sign message using given seed, and the resulting 70signature should be equal to the given signature 71DecryptMatch - ciphertext decrypts to plaintext 72(more to come here) 73