crypto/weakcryptospi/test/tcryptospi/testdata/hashhmac/readme.txt
changeset 8 35751d3474b7
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
       
     1 *********************************
       
     2 "HashGen.pl" README DOCUMENTATION
       
     3 
       
     4 Paul Sinfield
       
     5 v1.0
       
     6 28/02/2007
       
     7 *********************************
       
     8 
       
     9 The hashgen.pl script generates Hash and Hmac expected Hexadecimal string values for a given source file and the specified secret key.
       
    10 
       
    11 The following hash algorithms are supported:
       
    12 
       
    13 HASH: MD2/MD4/MD5/SHA-1
       
    14 HMAC: MD2/MD4/MD5/SHA-1
       
    15 
       
    16 
       
    17 1. Before running the script file, please ensure that the following files have been copied into the "c:\apps\perl\site\lib\digest" directory:
       
    18 
       
    19 HMAC-MD2.pm
       
    20 HMAC-MD4.pm
       
    21 
       
    22 
       
    23 2. The script takes 2 arguments as follows:
       
    24 
       
    25 hashgen.pl <Source File Path> <Key>
       
    26 
       
    27 e.g. hashgen.pl "C:\testdata\tcryptospi\data\LargeHash-SRC.dat" CryptoSpiValidKey
       
    28 
       
    29 NOTE: Please ensure that speech marks ("") are placed around arguments that have spaces in them, such as file paths.
       
    30 
       
    31 
       
    32 3. Once the script has been run, the results will be output a text file with the same name as the source but with a suffix "*_HASHES.txt", within the same directory.
       
    33 
       
    34 e.g. LargeHash-SRC_HASHDATA.txt
       
    35 
       
    36 An example of the files contents are displayed below:
       
    37 
       
    38 ****** HASH MD2/MD4/MD5/SHA1 ******
       
    39 
       
    40 MD2: 359df8d2cc91db9c8ec0f61718b65a60
       
    41 MD4: 826598b8fa06b7deafd255280319e38b
       
    42 MD5: 201f59b84894f378e1cce73abea86ca6
       
    43 SHA1: 21ef662c79cb3e972a3bb71937381b26e0daa2fc
       
    44 
       
    45 ****** HMAC MD2/MD4/MD5/SHA1 ******
       
    46 
       
    47 HMAC-MD2: 50635299e47531b4913abf986c063054
       
    48 HMAC-MD4: 9e1734fe8dae94d48a9b8fbdd1b55d3a
       
    49 HMAC-MD5: 0db3d1f04967261a9761140f44ef0c4a
       
    50 HMAC-SHA1: 101607c5a079b69c439f307e0590af588c9bf7e2
       
    51 
       
    52 Key: CryptoSpiValidKey
       
    53 
       
    54 
       
    55 *********************************
       
    56 "HashGenSha2.pl" README DOCUMENTATION
       
    57 
       
    58 *********************************
       
    59 
       
    60 The hashgensha2.pl script generates Hash and Hmac expected Hexadecimal string values for a given source file and the specified secret key for Sha224, Sha256, Sha384 and Sha 512.
       
    61 
       
    62 Before Running the script file, ensure that openssl is installed onto the system.
       
    63 
       
    64 The script takes 2 arguments as follows:
       
    65 hashgensha2.pl <Source File>  <Key>
       
    66 
       
    67 e.g. hashgen.pl "LargeHash-SRC.dat" CryptoSpiValidKey
       
    68 
       
    69 3. Once the script has been run, the results will be output a text file with the same name as the source but with a suffix "*_SHA2HASHDATA.txt", within the same directory.
       
    70 
       
    71 e.g. largehash-src_SHA2HASHDATA.txt
       
    72 
       
    73 An example of the files contents are displayed below:
       
    74 ****** HASH SHA224/SHA256/SHA384/SHA512 ******
       
    75 
       
    76 SHA224(largehash-src.dat)= c363a255fc7db36aeecfcfa6f9790ecb75043a0f5ebe8cc79a3c7a6a
       
    77 SHA256(largehash-src.dat)= 83b7bc6895df985de5543e8cd2b150232a4b9b4ba093c92fec725a924e4279aa
       
    78 SHA384(largehash-src.dat)= 7785397e9094c917e76c0ed1cfdb59c073f5ec4d29c503c6c8f28bfde1ee46bd43f21ca7f49b754f6cc94ff37e50798c
       
    79 SHA512(largehash-src.dat)= e93c8160c1a9888d8a03a8ffa97a3682597789b9e5250a0cffa0ac984c85e557356201068ef5fa3e968a7623597ba65c50248dab70233f68e547bbc03e58e441
       
    80 
       
    81 
       
    82 ****** HMAC SHA224/SHA256/SHA384/SHA512 ******
       
    83 
       
    84 HMAC-SHA224(largehash-src.dat)= e811df3c4ef67a7ef57baffa7e796a5ec2bfec357eb8ef03dabc9c97
       
    85 HMAC-SHA256(largehash-src.dat)= 7bdcc4bed110ccafd5b152de05af95441bce9a1e608abb7e46b10c2e7cee7dc9
       
    86 HMAC-SHA384(largehash-src.dat)= 258d6725d583482bca882af8b8a18f9ec2c002047051beda50d447aedb7721ef0c4511c04a71f82641ce865a2e83dd21
       
    87 HMAC-SHA512(largehash-src.dat)= 38e9456ce22cb3ba6a642bb9ca2d3c8722dad96397da1cfa6ff072eaf8cd661798be8f9b3af7f2b4e930fc4370351f891a2b938cb4d312faae13cccd06fc302c