Test Implementation of SHA-3 Secure Hash Algorithm 3 by James Pate Williams, Jr. BA, BS, MSwE, PhD

The primary source for this C# implementation was FIPS 202:

Click to access NIST.FIPS.202.pdf

The first test of my implementation consists of the 5 bits 11001 = 16 + 8 + 1 = 25. The output from my test application is given below:

SHA-3 Test

Message Digest SHA3-224
FF BA D5 DA 96 BA D7 17 89 33 02 06 DC 67 68 EC 
AE B1 B3 2D CA 6B 33 01 48 96 74 AB

Message Digest SHA3-256
7B 00 47 CF 5A 45 68 82 36 3C BF 0F B0 53 22 CF 
65 F4 B7 05 9A 46 36 5E 83 01 32 E3 B5 D9 57 AF

Message Digest SHA3-384
73 7C 9B 49 18 85 E9 BF 74 28 E7 92 74 1A 7B F8 
DC A9 65 34 71 C3 E1 48 47 3F 2C 23 6B 6A 0A 64 
55 EB 1D CE 9F 77 9B 4B 6B 23 7F EF 17 1B 1C 64

Message Digest SHA3-512
A1 3E 01 49 41 14 C0 98 00 62 2A 70 28 8C 43 21 
21 CE 70 03 9D 75 3C AD D2 E0 06 E4 D9 61 CB 27 
54 4C 14 81 E5 81 4B DC EB 53 BE 67 33 D5 E0 99 
79 5E 5E 81 91 8A DD B0 58 E2 2A 9F 24 88 3F 37

See the following NIST generated files:

Click to access SHA3-224_Msg5.pdf

Click to access SHA3-256_Msg5.pdf

Click to access SHA3-384_Msg5.pdf

Click to access SHA3-512_Msg5.pdf

New 30-bit test string: 110010100001101011011110100110.

SHA-3 Test 30-Bit

Message Digest SHA3-224
D6 66 A5 14 CC 9D BA 25 AC 1B A6 9E D3 93 04 60 
DE AA C9 85 1B 5F 0B AA B0 07 DF 3B

Message Digest SHA3-256
C8 24 2F EF 40 9E 5A E9 D1 F1 C8 57 AE 4D C6 24 
B9 2B 19 80 9F 62 AA 8C 07 41 1C 54 A0 78 B1 D0

Message Digest SHA3-384
95 5B 4D D1 BE 03 26 1B D7 6F 80 7A 7E FD 43 24 
35 C4 17 36 28 11 B8 A5 0C 56 4E 7E E9 58 5E 1A 
C7 62 6D DE 2F DC 03 0F 87 61 96 EA 26 7F 08 C3

Message Digest SHA3-512
98 34 C0 5A 11 E1 C5 D3 DA 9C 74 0E 1C 10 6D 9E 
59 0A 0E 53 0B 6F 6A AA 78 30 52 5D 07 5C A5 DB 
1B D8 A6 AA 98 1A 28 61 3A C3 34 93 4A 01 82 3C 
D4 5F 45 E4 9B 6D 7E 69 17 F2 F1 67 78 06 7B AB

See Secure Hashing FIPS 202 SHA-3 on the NIST webpage:

https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/example-values

Unknown's avatar

Author: jamespatewilliamsjr

My whole legal name is James Pate Williams, Jr. I was born in LaGrange, Georgia approximately 70 years ago. I barely graduated from LaGrange High School with low marks in June 1971. Later in June 1979, I graduated from LaGrange College with a Bachelor of Arts in Chemistry with a little over a 3 out 4 Grade Point Average (GPA). In the Spring Quarter of 1978, I taught myself how to program a Texas Instruments desktop programmable calculator and in the Summer Quarter of 1978 I taught myself Dayton BASIC (Beginner's All-purpose Symbolic Instruction Code) on LaGrange College's Data General Eclipse minicomputer. I took courses in BASIC in the Fall Quarter of 1978 and FORTRAN IV (Formula Translator IV) in the Winter Quarter of 1979. Professor Kenneth Cooper, a genius poly-scientist taught me a course in the Intel 8085 microprocessor architecture and assembly and machine language. We would hand assemble our programs and insert the resulting machine code into our crude wooden box computer which was designed and built by Professor Cooper. From 1990 to 1994 I earned a Bachelor of Science in Computer Science from LaGrange College. I had a 4 out of 4 GPA in the period 1990 to 1994. I took courses in C, COBOL, and Pascal during my BS work. After graduating from LaGrange College a second time in May 1994, I taught myself C++. In December 1995, I started using the Internet and taught myself client-server programming. I created a website in 1997 which had C and C# implementations of algorithms from the "Handbook of Applied Cryptography" by Alfred J. Menezes, et. al., and some other cryptography and number theory textbooks and treatises.

Leave a comment