Another Matrix Cipher by James Pate Williams, Jr. BA, BS, MSwE, PhD

This is perhaps an improvement on the matrix cipher of a previous blog post of mine. In that post I introduced a matrix cipher whose keys were generated by selection of a seed such that 1 <= seed <= 2147483647, a number N such that 2 <= N <= 1000, and plaintext of length n such that 1 <= n <= N -1.

This matrix cipher relies on the ANSI X9.17 pseudorandom number generator (PRNG) of 5.11 Algorithm of the Handbook of Applied Cryptography by Alfred J. Menezes, et al. The PRNG uses triple-DES with a potential 168-bit (56 * 3 = 168) key space using E-D-E (Encryption key 1 – Decryption key 2 – Encryption key 3). Also, a 64-bit date related number and a 64-bit random seed are needed to initialize the PRNG.

The key space for the algorithm is (168 + 128) bits which is 296 bits. Here is the encryption and decryption of the ASCII ten characters string “ATTACK NOW”.

New Matrix Cipher 0

New Matrix Cipher 1

New Matrix Cipher 2

New Matrix Cipher 3

New Matrix Cipher 4

The first step in the cryptanalysis of this cipher would be to determine the modulus of the matrix and vector calculations N. I don’t know how many ciphertexts would be necessary to perform this task. From the preceding known ciphertext we find that N is at least 991. From traffic analysis we may have determined that the maximum value of N is 1000. That means would we only need to try 10 values of N.

 

A Matrix Cipher by James Pate Williams, Jr., BA, BS, MSwE, PhD

Suppose you have a n vector of ASCII encoded characters, arbitrarily choose 1 <= n <= 1000. Choose a modulus N such that 128 <= N <= 1000. Also choose a pseudo-random number seed 1 <= s <= 2147483647. Next find a random n x n matrix that is invertible by Gaussian elimination over the integer field consisting of N elements. Suppose this matrix is M and its tridiagonal form is M’. Now suppose the plaintext is the n vector P and the ciphertext is the n vector C then we have for encryption:

C = M’P

Further assume the inverse of M’ is N’. For decryption we use the equation:

P = N’C

Where

M’N’ = N’M’ = I

Such that I is the n x n identity matrix.

This cipher is related to the classic Hill Cipher. This cipher is polyalphabetic. We show the results of one encryption and decryption using 10 ASCII ‘A’ characters, N = 999, and s = 1. As you can see each occurrence of the letter ‘A’ which is encoded as the decimal number 65 leads to different integer in the range 0 to 998 which has a maximum of 10 bits. The key consists of the 100 integers in the original 10 x 10 matrix. The application was implemented in C# using a Gaussian elimination over a number field algorithm from Henri Cohen’s A Course in Computational Algebraic Number Theory.

Matrix Cipher 0

Matrix Cipher 1

Matrix Cipher 2

Two of My Many Sorting Algorithms Implementations by James Pate Williams, Jr. BA, BS, MSwE, PhD

A recurring theme in my life has been to implement and re-implement the sorting algorithms found in Harold Lorin’s treatise Sorting and Sort Systems and Thomas H. Corman et al.’s Algorithms. I purchased a copy of Lorin’s book in the summer of 1979 and Corman’s textbook in 1999 or 2000. This has been good exercise in translating from one computer language to a later and greater newer computer language. I began in BASIC and FORTRAN IV and transitioned to C, C++, C#, Common LISP, Java, Modula-2, Pascal, and Scheme in alphabetic not chronological order. In this blog we cover two C# applications, one from October 26, 2010, named Sorting Comparisons and the other from January 17, 2015, with the moniker Sorting.

In the Sorting Comparisons application, we compare the sorting algorithms: Heap Sort, Quick Sort, and Singleton’s Sort. The first two algorithms are from the Algorithms tome and Singleton’s Sort is from Lorin’s treatment. These are some of the fastest general purpose sorting algorithms available in my particular arsenal.

Sorting Comparisons Test All 16Sorting Comparisons Time All 1000Sorting Comparisons Time All 10000Sorting Comparisons Time All 100000Sorting Comparisons Time All 1000000

Sorting Comparisons Source Code

https://code.msdn.microsoft.com/windowsdesktop/Tests-of-Six-Sorting-94aa6fd0?redir=0

 

Excerpt from My Memoirs “Clinging onto the Edge of the Abyss” by James Pate Williams, Jr. BA, BS, MSwE, PhD

I believe in late spring quarter of 1978, Mr. P.M. Hicks, a chemistry and physics professor at LaGrange College, introduced me to a large desktop Texas Instruments (TI) programmable calculator. I immediately became immersed in the manual and I learned the rudiments of calculator programming on this machine.

I advanced onto LaGrange College’s new Data General Eclipse minicomputer in the summer of 1978. I taught myself Dayton BASIC (Beginner’s All Purpose Symbolic Instruction Code) using the book “BASIC Programming” by Paul W. Murrill and Cecil L. Smith of which I still own a copy and it is copyrighted 1971. I seem to recall I special ordered the textbook from the LaGrange College library. This self-study put me many steps in front of my peers in the Fall Quarter of 1978 when I took a course under Professor Kenneth Cooper on BASIC programming. I taught Professor Cooper how to perform matrix and vector calculations using the Data General BASIC interpreter.

I also was taking my first course in physical chemistry in the fall of 1978. During the week of Monday, November 6, 1978 my physical chemistry partner Chuck H. Pitts (now Dr. Chuck H. Pitts, a prominent dentist in LaGrange, GA) did an experiment whose lab report title was “Determination of Molecular Size and Avogadro’s Number”. I seem to recall the division of labor was that I perform the calculations with the aid of a BASIC computer and Chuck and I would write up the experiment and I believe someone in the Callaway Foundation office or Chuck did the actual typing of the document at the Callaway Foundation office on Broome Street in LaGrange, GA. Well it took a lot of persuasion by Chuck to get me to do my part, since back in that era I was prone to destructive perfectionism. (Incidentally, I did not give up on being a perfectionist until Professor Felton at Georgia Tech in 1981 stated categorically “There is no room for perfectionism in science.”)

In the Winter Quarter of 1979 I took a FORTRAN (Formula Translator) IV course under Professor Kenneth Cooper. That quarter I also had Professor Cooper for Physical Chemistry II and Biochemistry. I did well in the computer programming course and I can remember helping several fellow students to pass the course. Professor Brooks Shelhorse then of the Math Department was one of my fellow classmates that I tutored. Biochemistry was an 8:00 AM course. I spent a lot of late nights in the computer lab, so I would sometimes fall asleep during the biochemistry lectures. I distinctly remember Dr. Cooper hurling an eraser near me to wake me up one morning. I made B’s in the two chemistry courses.

Spring Quarter of 1979 was my final quarter as a chemistry student at LaGrange College. I took Quantitative Analysis II, an Independent Study in Chemistry, General Physics III, and Angling. I made all A’s that quarter. The independent study was an introductory course to architecture and programming of the Intel 8085 microprocessor. Dr. Cooper in his time as a computer engineering student at Auburn University had built two very nice and unique computers, a rather large analog computer and a digital computer that consisted of an Intel 8085 microprocessor in a wooden box with hexadecimal keypad, two seven segment red light emitting diode displays, EEPROM, and RAM memory.  I used the digital computer in my independent study. Professor Cooper taught me about the instruction set for the microprocessor and I would hand assemble my assembly language programs into two hexadecimal digit strings of machine code and manually enter the machine code via the keypad. One of my first assignments was to count down from 0xFF = 255 decimal to 0x00 = 0 decimal. I had a delay of about a ¼ second built into the program, so it took me one minute and four seconds to count down to zero. I was the only student in my independent study, therefore, it sometimes felt funny to have Professor Cooper give a whole one-hour lecture to an audience of one.

I bought the IBM book “Sorting and Sort Systems” by Harold Lorin in the summer of 1979. I proceeded to implement most of the sorting and merge algorithms in the book. I first translated the IBM PL/I (Programming Language I) code to BASIC and later for FORTRAN IV. Professor Cooper had developed a large BASIC program for the LaGrange College Registrar, Jimmy Herring. This program used a slow sorting algorithm which was either Shell sort of Bubble sort. I implemented a very fast sorting algorithm named Singleton’s sort in BASIC and was able to dramatically cut the time required to sort all the students by their Social Security Administration numbers which many colleges and universities then used as their primary flat-file or database key. I also began teaching myself the Data General Advanced Operating System (AOS) macro-assembly language. Like many computer programmers before I became infatuated with all the control over an operating system that assembly language afforded a knowledgeable programmer.

I convinced my parents to pay for me to audit Calculus and Analytic Geometry IV under Professor Shelhorse during the Fall Quarter of 1979, so I would have an excuse to be on campus to use my favorite computer, the LaGrange College Data General Eclipse minicomputer. That quarter I re-implemented my fast sorting algorithm in assembly language and set a new sorting time record with a program that sorting about 1000 student data records. Since the code was in AOS macro-assembly language it could not be readily integrated with the existing registrar’s system.

In 1980 I bummed around the college using the computer system until I was accepted to chemistry graduate school at the Georgia Institute of Technology for the Fall Quarter of 1980. I taught myself Data General Pascal and furthered my work with macro-assembly language, BASIC, and FORTRAN IV in the Winter, Spring, and Summer Quarters of 1980 at LaGrange College. I was unpaid computer programming teaching assistant for those three quarters which allowed me to earn my keep so to speak.

http://www.lagrange.edu/index.html

https://social.technet.microsoft.com/Profile/james%20pate%20williams%20jr

https://www.facebook.com/pg/JamesPateWilliamsJrConsultant/posts/

https://www.linkedin.com/in/james-williams-1a5b1370/

 

 

 

Chapter 8 of the Handbook of Applied Cryptography by Alfred J. Menezes, Paul C. van Oorschot, and Scott A. Vanstone Highlights by James Pate Williams, Jr. BA, BS, MSwE, PhD

Chapter 8 of the Handbook is devoted to the public key encryption systems available in the late 1990s. The most interesting algorithms in my humble opinion are:

  1. RSA (Rivest, Shamir, and Adleman) Public Key Algorithm
  2. Rabin Public Key Encryption Public Key Algorithm
  3. Generalized ElGamal Public Key Encryption Algorithm

My original C implementations that were created in the period 1996 to 1998 utilized the Free LIP (Free Large Integer Package) which was designed and implemented by Arjen K. Lenstra. Later, this particular  Professor Lenstra helped in the development of the General and Special Number Field Sieve. He is also of factoring large integers fame. I used the C# language again in my testing implementations.

First we display the RSA results using an artificially small bit size of 256 bits.

RSA Chapter 8

Key Generation

k :
256
n :
 71748965933911640426880165731135238544415795986802264097926042451628661227723
d :
17534201656439215903029293361854099060868747295577796745436087467699018441853
e :
46435195294099703737718314333558788184905780513774200544498948302189056810037

Encryption

plaintext :
Now is the time for all good men to come to the aid of the party
4e 6f 77 20 69 73 20 74 68 65 20 74 69 6d 65 20 66 6f 72 20 61 6c 6c 20 67 6f 6f 64 20 6d 65 6e 20 74 6f 20 63 6f 6d 65 20 74 6f 20 74 68 65 20 61 69 64 20 6f 66 20 74 68 65 20 70 61 72 74 79

bytes per block = 32
number blocks = 3

plaintext :
Now is the time for all good men to come to the aid of the party

ciphertext :
37 97 74 00 91 d6 09 6e f6 92 c0 7d 2b 55 27 3f 49 4c 8f 56 a0 3a 2e fb 24 9d cc a7 f4 6e c5 88 a3 5b 1c 5c 9e d3 c8 2e dd 4e f0 1a 4c 13 03 ec 88 ea 84 19 56 bc 8e b1 00 04 1f 16 cf 26 16 0a 68 75 69 03 21 fe 9f bd f0 0b 41 9b 6d 42 0f bc 3a c2 cc 81 08 5f 88 8c 55 f3 ac 63 03 00 73 23

Decryption

4e 6f 77 20 69 73 20 74 68 65 20 74 69 6d 65 20 66 6f 72 20 61 6c 6c 20 67 6f 6f 64 20 6d 65 6e 20 74 6f 20 63 6f 6d 65 20 74 6f 20 74 68 65 20 61 69 64 20 6f 66 20 74 68 65 20 70 61 72 74 79

plaintext :
Now is the time for all good men to come to the aid of the party

Rabin Chapter 8

Next we illustrate the Rabin public key cryptosystem using a 12-bit key.

Key Generation

k = 128
n = 211556863392599022339215233849307913121
p = 13935902955925754761
q = 15180707275422140761

Encryption

plaintext = Now is the time for all good men to come to the aid of the party
4e 6f 77 20 69 73 20 74 68 65 20 74 69 6d 65 20 66 6f 72 20 61 6c 6c 20 67 6f 6f 64 20 6d 65 6e 20 74 6f 20 63 6f 6d 65 20 74 6f 20 74 68 65 20 61 69 64 20 6f 66 20 74 68 65 20 70 61 72 74 79 
bytes per block = 16
number blocks = 5
a7 f3 64 45 7e 4d 63 7a fc 6f f4 58 05 2a 00 13 4c ea 0f 35 f2 a9 06 a0 18 84 7f f8 e0 1a ab 29 dd f7 77 7d a3 e0 5e fa 38 91 b3 43 f0 3b 45 38 20 82 df 81 56 28 eb fc d6 fd 1a 02 4b c4 6f 6b 00 40

Decryption

plaintext = Now is the time for all good men to come to the aid of the party

Now we move onto the generalized ElGamal public key cryptosystem.

ElGamal Chapter 8

Key Generation

k = 128
p = 461570115794525767856064295512031627189
a = 65681037355098887145615950726949326919
alpha = 329715121991374833383052968963601528401
alpha-a = 112278742131178183966835822395003469140

Encryption

plaintext = Now is the time for all good men to come to the aid of the party
4e 6f 77 20 69 73 20 74 68 65 20 74 69 6d 65 20 66 6f 72 20 61 6c 6c 20 67 6f 6f 64 20 6d 65 6e 20 74 6f 20 63 6f 6d 65 20 74 6f 20 74 68 65 20 61 69 64 20 6f 66 20 74 68 65 20 70 61 72 74 79 
bytes per block = 16
number blocks = 5

Decryption

plaintext = Now is the time for all good men to come to the aid of the party

 

Advanced Encryption Standard and FIPS 197 by James Pate Williams, Jr. BA, BS, MSwE, PhD

Way back in the relative day of 2009 to 2010, I implemented and tested a rudimentary implementation in C# of the Advanced Encryption Standard (AES) using the document FIPS 197. Below are some screen shots and data from the test application.

AES Test 128 Bit Key Expansion

NIST Standard Test Data
Expansion of a 128-Bit Cipher Key

Cipher Key:
2b 7e 15 16 28 ae d2 a6 ab f7 15 88 9 cf 4f 3c

w[0] = 2b7e1516
w[1] = 28aed2a6
w[2] = abf71588
w[3] = 09cf4f3c

04 09cf4f3c cf4f3c09 8a84eb01 01000000 8b84eb01 2b7e1516 a0fafe17 
05 a0fafe17 28aed2a6 88542cb1 
06 88542cb1 abf71588 23a33939 
07 23a33939 09cf4f3c 2a6c7605 
08 2a6c7605 6c76052a 50386be5 02000000 52386be5 a0fafe17 f2c295f2 
09 f2c295f2 88542cb1 7a96b943 
10 7a96b943 23a33939 5935807a 
11 5935807a 2a6c7605 7359f67f 
12 7359f67f 59f67f73 cb42d28f 04000000 cf42d28f f2c295f2 3d80477d 
13 3d80477d 7a96b943 4716fe3e 
14 4716fe3e 5935807a 1e237e44 
15 1e237e44 7359f67f 6d7a883b 
16 6d7a883b 7a883b6d dac4e23c 08000000 d2c4e23c 3d80477d ef44a541 
17 ef44a541 4716fe3e a8525b7f 
18 a8525b7f 1e237e44 b671253b 
19 b671253b 6d7a883b db0bad00 
20 db0bad00 0bad00db 2b9563b9 10000000 3b9563b9 ef44a541 d4d1c6f8 
21 d4d1c6f8 a8525b7f 7c839d87 
22 7c839d87 b671253b caf2b8bc 
23 caf2b8bc db0bad00 11f915bc 
24 11f915bc f915bc11 99596582 20000000 b9596582 d4d1c6f8 6d88a37a 
25 6d88a37a 7c839d87 110b3efd 
26 110b3efd caf2b8bc dbf98641 
27 dbf98641 11f915bc ca0093fd 
28 ca0093fd 0093fdca 63dc5474 40000000 23dc5474 6d88a37a 4e54f70e 
29 4e54f70e 110b3efd 5f5fc9f3 
30 5f5fc9f3 dbf98641 84a64fb2 
31 84a64fb2 ca0093fd 4ea6dc4f 
32 4ea6dc4f a6dc4f4e 2486842f 80000000 a486842f 4e54f70e ead27321 
33 ead27321 5f5fc9f3 b58dbad2 
34 b58dbad2 84a64fb2 312bf560 
35 312bf560 4ea6dc4f 7f8d292f 
36 7f8d292f 8d292f7f 5da515d2 1b000000 46a515d2 ead27321 ac7766f3 
37 ac7766f3 b58dbad2 19fadc21 
38 19fadc21 312bf560 28d12941 
39 28d12941 7f8d292f 575c006e 
40 575c006e 5c006e57 4a639f5b 36000000 7c639f5b ac7766f3 d014f9a8 
41 d014f9a8 19fadc21 c9ee2589 
42 c9ee2589 28d12941 e13f0cc8 
43 e13f0cc8 575c006e b6630ca6

 

AES Test 192 Bit Key Expansion

NIST Standard Test Data
Expansion of a 192-Bit Cipher Key

Cipher Key:
8e 73 b0 f7 da 0e 64 52 c8 10 f3 2b 
80 90 79 e5 62 f8 ea d2 52 2c 6b 7b

w[0] = 8e73b0f7
w[1] = da0e6452
w[2] = c810f32b
w[3] = 809079e5
w[4] = 62f8ead2
w[5] = 522c6b7b

06 522c6b7b 2c6b7b52 717f2100 01000000 707f2100 8e73b0f7 fe0c91f7 
07 fe0c91f7 da0e6452 2402f5a5 
08 2402f5a5 c810f32b ec12068e 
09 ec12068e 809079e5 6c827f6b 
10 6c827f6b 62f8ead2 0e7a95b9 
11 0e7a95b9 522c6b7b 5c56fec2 
12 5c56fec2 56fec25c b1bb254a 02000000 b3bb254a fe0c91f7 4db7b4bd 
13 4db7b4bd 2402f5a5 69b54118 
14 69b54118 ec12068e 85a74796 
15 85a74796 6c827f6b e92538fd 
16 e92538fd 0e7a95b9 e75fad44 
17 e75fad44 5c56fec2 bb095386 
18 bb095386 095386bb 01ed44ea 04000000 05ed44ea 4db7b4bd 485af057 
19 485af057 69b54118 21efb14f 
20 21efb14f 85a74796 a448f6d9 
21 a448f6d9 e92538fd 4d6dce24 
22 4d6dce24 e75fad44 aa326360 
23 aa326360 bb095386 113b30e6 
24 113b30e6 3b30e611 e2048e82 08000000 ea048e82 485af057 a25e7ed5 
25 a25e7ed5 21efb14f 83b1cf9a 
26 83b1cf9a a448f6d9 27f93943 
27 27f93943 4d6dce24 6a94f767 
28 6a94f767 aa326360 c0a69407 
29 c0a69407 113b30e6 d19da4e1 
30 d19da4e1 9da4e1d1 5e49f83e 10000000 4e49f83e a25e7ed5 ec1786eb 
31 ec1786eb 83b1cf9a 6fa64971 
32 6fa64971 27f93943 485f7032 
33 485f7032 6a94f767 22cb8755 
34 22cb8755 c0a69407 e26d1352 
35 e26d1352 d19da4e1 33f0b7b3 
36 33f0b7b3 f0b7b333 8ca96dc3 20000000 aca96dc3 ec1786eb 40beeb28 
37 40beeb28 6fa64971 2f18a259 
38 2f18a259 485f7032 6747d26b 
39 6747d26b 22cb8755 458c553e 
40 458c553e e26d1352 a7e1466c 
41 a7e1466c 33f0b7b3 9411f1df 
42 9411f1df 11f1df94 82a19e22 40000000 c2a19e22 40beeb28 821f750a 
43 821f750a 2f18a259 ad07d753 
44 ad07d753 6747d26b ca400538 
45 ca400538 458c553e 8fcc5006 
46 8fcc5006 a7e1466c 282d166a 
47 282d166a 9411f1df bc3ce7b5 
48 bc3ce7b5 3ce7b5bc eb94d565 80000000 6b94d565 821f750a e98ba06f 
49 e98ba06f ad07d753 448c773c 
50 448c773c ca400538 8ecc7204 
51 8ecc7204 8fcc5006 01002202

AES Test 256 Bit Key Expansion

NIST Standard Test Data
Expansion of a 256-Bit Cipher Key

Cipher Key:
60 3d eb 10 15 ca 71 be 2b 73 ae f0 85 7d 77 81 
1f 35 2c 07 3b 61 08 d7 2d 98 10 a3 09 14 df f4

w[0] = 603deb10
w[1] = 15ca71be
w[2] = 2b73aef0
w[3] = 857d7781
w[4] = 1f352c07
w[5] = 3b6108d7
w[6] = 2d9810a3
w[7] = 0914dff4

08 0914dff4 14dff409 fa9ebf01 01000000 fb9ebf01 603deb10 9ba35411 
09 9ba35411 15ca71be 8e6925af 
10 8e6925af 2b73aef0 a51a8b5f 
11 a51a8b5f 857d7781 2067fcde 
12 2067fcde b785b01d 1f352c07 a8b09c1a 
13 a8b09c1a 3b6108d7 93d194cd 
14 93d194cd 2d9810a3 be49846e 
15 be49846e 0914dff4 b75d5b9a 
16 b75d5b9a 5d5b9ab7 4c39b8a9 02000000 4e39b8a9 9ba35411 d59aecb8 
17 d59aecb8 8e6925af 5bf3c917 
18 5bf3c917 a51a8b5f fee94248 
19 fee94248 2067fcde de8ebe96 
20 de8ebe96 1d19ae90 a8b09c1a b5a9328a 
21 b5a9328a 93d194cd 2678a647 
22 2678a647 be49846e 98312229 
23 98312229 b75d5b9a 2f6c79b3 
24 2f6c79b3 6c79b32f 50b66d15 04000000 54b66d15 d59aecb8 812c81ad 
25 812c81ad 5bf3c917 dadf48ba 
26 dadf48ba fee94248 24360af2 
27 24360af2 de8ebe96 fab8b464 
28 fab8b464 2d6c8d43 b5a9328a 98c5bfc9 
29 98c5bfc9 2678a647 bebd198e 
30 bebd198e 98312229 268c3ba7 
31 268c3ba7 2f6c79b3 09e04214 
32 09e04214 e0421409 e12cfa01 08000000 e92cfa01 812c81ad 68007bac 
33 68007bac dadf48ba b2df3316 
34 b2df3316 24360af2 96e939e4 
35 96e939e4 fab8b464 6c518d80 
36 6c518d80 50d15dcd 98c5bfc9 c814e204 
37 c814e204 bebd198e 76a9fb8a 
38 76a9fb8a 268c3ba7 5025c02d 
39 5025c02d 09e04214 59c58239 
40 59c58239 c5823959 a61312cb 10000000 b61312cb 68007bac de136967 
41 de136967 b2df3316 6ccc5a71 
42 6ccc5a71 96e939e4 fa256395 
43 fa256395 6c518d80 9674ee15 
44 9674ee15 90922859 c814e204 5886ca5d 
45 5886ca5d 76a9fb8a 2e2f31d7 
46 2e2f31d7 5025c02d 7e0af1fa 
47 7e0af1fa 59c58239 27cf73c3 
48 27cf73c3 cf73c327 8a8f2ecc 20000000 aa8f2ecc de136967 749c47ab 
49 749c47ab 6ccc5a71 18501dda 
50 18501dda fa256395 e2757e4f 
51 e2757e4f 9674ee15 7401905a 
52 7401905a 927c60be 5886ca5d cafaaae3 
53 cafaaae3 2e2f31d7 e4d59b34 
54 e4d59b34 7e0af1fa 9adf6ace 
55 9adf6ace 27cf73c3 bd10190d 
56 bd10190d 10190dbd cad4d77a 40000000 8ad4d77a 749c47ab fe4890d1 
57 fe4890d1 18501dda e6188d0b 
58 e6188d0b e2757e4f 046df344 
59 046df344 7401905a 706c631e

AES Test 128 Bit Detailed Example

NIST Standard Test Data
Cipher Detailed Example
FIPS 197 Pages 33 to 34

Input into Cipher
32 88 31 e0 
43 5a 31 37 
f6 30 98 07 
a8 8d a2 34

After AddRoundKey
19 a0 9a e9 
3d f4 c6 f8 
e3 e2 8d 48 
be 2b 2a 08

After SubBytes
d4 e0 b8 1e 
27 bf b4 41 
11 98 5d 52 
ae f1 e5 30

After ShiftRows
d4 e0 b8 1e 
bf b4 41 27 
5d 52 11 98 
30 ae f1 e5

After MixColumns
04 e0 48 28 
66 cb f8 06 
81 19 d3 26 
e5 9a 7a 4c

After AddRoundKey
a4 68 6b 02 
9c 9f 5b 6a 
7f 35 ea 50 
f2 2b 43 49

After SubBytes
49 45 7f 77 
de db 39 02 
d2 96 87 53 
89 f1 1a 3b

After ShiftRows
49 45 7f 77 
db 39 02 de 
87 53 d2 96 
3b 89 f1 1a

After MixColumns
58 1b db 1b 
4d 4b e7 6b 
ca 5a ca b0 
f1 ac a8 e5

After AddRoundKey
aa 61 82 68 
8f dd d2 32 
5f e3 4a 46 
03 ef d2 9a

After SubBytes
ac ef 13 45 
73 c1 b5 23 
cf 11 d6 5a 
7b df b5 b8

After ShiftRows
ac ef 13 45 
c1 b5 23 73 
d6 5a cf 11 
b8 7b df b5

After MixColumns
75 20 53 bb 
ec 0b c0 25 
09 63 cf d0 
93 33 7c dc

After AddRoundKey
48 67 4d d6 
6c 1d e3 5f 
4e 9d b1 58 
ee 0d 38 e7

After SubBytes
52 85 e3 f6 
50 a4 11 cf 
2f 5e c8 6a 
28 d7 07 94

After ShiftRows
52 85 e3 f6 
a4 11 cf 50 
c8 6a 2f 5e 
94 28 d7 07

After MixColumns
0f 60 6f 5e 
d6 31 c0 b3 
da 38 10 13 
a9 bf 6b 01

After AddRoundKey
e0 c8 d9 85 
92 63 b1 b8 
7f 63 35 be 
e8 c0 50 01

After SubBytes
e1 e8 35 97 
4f fb c8 6c 
d2 fb 96 ae 
9b ba 53 7c

After ShiftRows
e1 e8 35 97 
fb c8 6c 4f 
96 ae d2 fb 
7c 9b ba 53

After MixColumns
25 bd b6 4c 
d1 11 3a 4c 
a9 d1 33 c0 
ad 68 8e b0

After AddRoundKey
f1 c1 7c 5d 
00 92 c8 b5 
6f 4c 8b d5 
55 ef 32 0c

After SubBytes
a1 78 10 4c 
63 4f e8 d5 
a8 29 3d 03 
fc df 23 fe

After ShiftRows
a1 78 10 4c 
4f e8 d5 63 
3d 03 a8 29 
fe fc df 23

After MixColumns
4b 2c 33 37 
86 4a 9d d2 
8d 89 f4 18 
6d 80 e8 d8

After AddRoundKey
26 3d e8 fd 
0e 41 64 d2 
2e b7 72 8b 
17 7d a9 25

After SubBytes
f7 27 9b 54 
ab 83 43 b5 
31 a9 40 3d 
f0 ff d3 3f

After ShiftRows
f7 27 9b 54 
83 43 b5 ab 
40 3d 31 a9 
3f f0 ff d3

After MixColumns
14 46 27 34 
15 16 46 2a 
b5 15 56 d8 
bf ec d7 43

After AddRoundKey
5a 19 a3 7a 
41 49 e0 8c 
42 dc 19 04 
b1 1f 65 0c

After SubBytes
be d4 0a da 
83 3b e1 64 
2c 86 d4 f2 
c8 c0 4d fe

After ShiftRows
be d4 0a da 
3b e1 64 83 
d4 f2 2c 86 
fe c8 c0 4d

After MixColumns
00 b1 54 fa 
51 c8 76 1b 
2f 89 6d 99 
d1 ff cd ea

After AddRoundKey
ea 04 65 85 
83 45 5d 96 
5c 33 98 b0 
f0 2d ad c5

After SubBytes
87 f2 4d 97 
ec 6e 4c 90 
4a c3 46 e7 
8c d8 95 a6

After ShiftRows
87 f2 4d 97 
6e 4c 90 ec 
46 e7 4a c3 
a6 8c d8 95

After MixColumns
47 40 a3 4c 
37 d4 70 9f 
94 e4 3a 42 
ed a5 a6 bc

After AddRoundKey
eb 59 8b 1b 
40 2e a1 c3 
f2 38 13 42 
1e 84 e7 d2

After SubBytes
e9 cb 3d af 
09 31 32 2e 
89 07 7d 2c 
72 5f 94 b5

After ShiftRows
e9 cb 3d af 
31 32 2e 09 
7d 2c 89 07 
b5 72 5f 94

After AddRoundKey
39 02 dc 19 
25 dc 11 6a 
84 09 85 0b 
1d fb 97 32

NIST Standard Test Data
Inverse Cipher Detailed Example
FIPS 197 Pages 33 to 34

Input to Inverse Cipher
39 02 dc 19 
25 dc 11 6a 
84 09 85 0b 
1d fb 97 32

After AddRoundKey
e9 cb 3d af 
31 32 2e 09 
7d 2c 89 07 
b5 72 5f 94

After InvShiftRows
e9 cb 3d af 
09 31 32 2e 
89 07 7d 2c 
72 5f 94 b5

After InvSubBytes
eb 59 8b 1b 
40 2e a1 c3 
f2 38 13 42 
1e 84 e7 d2

After AddRoundKey
47 40 a3 4c 
37 d4 70 9f 
94 e4 3a 42 
ed a5 a6 bc

After InvMixColumns
87 f2 4d 97 
6e 4c 90 ec 
46 e7 4a c3 
a6 8c d8 95

After InvShiftRows
87 f2 4d 97 
ec 6e 4c 90 
4a c3 46 e7 
8c d8 95 a6

After InvSubBytes
ea 04 65 85 
83 45 5d 96 
5c 33 98 b0 
f0 2d ad c5

After AddRoundKey
00 b1 54 fa 
51 c8 76 1b 
2f 89 6d 99 
d1 ff cd ea

After InvMixColumns
be d4 0a da 
3b e1 64 83 
d4 f2 2c 86 
fe c8 c0 4d

After InvShiftRows
be d4 0a da 
83 3b e1 64 
2c 86 d4 f2 
c8 c0 4d fe

After InvSubBytes
5a 19 a3 7a 
41 49 e0 8c 
42 dc 19 04 
b1 1f 65 0c

After AddRoundKey
14 46 27 34 
15 16 46 2a 
b5 15 56 d8 
bf ec d7 43

After InvMixColumns
f7 27 9b 54 
83 43 b5 ab 
40 3d 31 a9 
3f f0 ff d3

After InvShiftRows
f7 27 9b 54 
ab 83 43 b5 
31 a9 40 3d 
f0 ff d3 3f

After InvSubBytes
26 3d e8 fd 
0e 41 64 d2 
2e b7 72 8b 
17 7d a9 25

After AddRoundKey
4b 2c 33 37 
86 4a 9d d2 
8d 89 f4 18 
6d 80 e8 d8

After InvMixColumns
a1 78 10 4c 
4f e8 d5 63 
3d 03 a8 29 
fe fc df 23

After InvShiftRows
a1 78 10 4c 
63 4f e8 d5 
a8 29 3d 03 
fc df 23 fe

After InvSubBytes
f1 c1 7c 5d 
00 92 c8 b5 
6f 4c 8b d5 
55 ef 32 0c

After AddRoundKey
25 bd b6 4c 
d1 11 3a 4c 
a9 d1 33 c0 
ad 68 8e b0

After InvMixColumns
e1 e8 35 97 
fb c8 6c 4f 
96 ae d2 fb 
7c 9b ba 53

After InvShiftRows
e1 e8 35 97 
4f fb c8 6c 
d2 fb 96 ae 
9b ba 53 7c

After InvSubBytes
e0 c8 d9 85 
92 63 b1 b8 
7f 63 35 be 
e8 c0 50 01

After AddRoundKey
0f 60 6f 5e 
d6 31 c0 b3 
da 38 10 13 
a9 bf 6b 01

After InvMixColumns
52 85 e3 f6 
a4 11 cf 50 
c8 6a 2f 5e 
94 28 d7 07

After InvShiftRows
52 85 e3 f6 
50 a4 11 cf 
2f 5e c8 6a 
28 d7 07 94

After InvSubBytes
48 67 4d d6 
6c 1d e3 5f 
4e 9d b1 58 
ee 0d 38 e7

After AddRoundKey
75 20 53 bb 
ec 0b c0 25 
09 63 cf d0 
93 33 7c dc

After InvMixColumns
ac ef 13 45 
c1 b5 23 73 
d6 5a cf 11 
b8 7b df b5

After InvShiftRows
ac ef 13 45 
73 c1 b5 23 
cf 11 d6 5a 
7b df b5 b8

After InvSubBytes
aa 61 82 68 
8f dd d2 32 
5f e3 4a 46 
03 ef d2 9a

After AddRoundKey
58 1b db 1b 
4d 4b e7 6b 
ca 5a ca b0 
f1 ac a8 e5

After InvMixColumns
49 45 7f 77 
db 39 02 de 
87 53 d2 96 
3b 89 f1 1a

After InvShiftRows
49 45 7f 77 
de db 39 02 
d2 96 87 53 
89 f1 1a 3b

After InvSubBytes
a4 68 6b 02 
9c 9f 5b 6a 
7f 35 ea 50 
f2 2b 43 49

After AddRoundKey
04 e0 48 28 
66 cb f8 06 
81 19 d3 26 
e5 9a 7a 4c

After InvMixColumns
d4 e0 b8 1e 
bf b4 41 27 
5d 52 11 98 
30 ae f1 e5

After InvShiftRows
d4 e0 b8 1e 
27 bf b4 41 
11 98 5d 52 
ae f1 e5 30

After InvSubBytes
19 a0 9a e9 
3d f4 c6 f8 
e3 e2 8d 48 
be 2b 2a 08

After AddRoundKey
32 88 31 e0 
43 5a 31 37 
f6 30 98 07 
a8 8d a2 34

AES Test 128 Bit Test Vector

NIST Standard Test Data
AES-128 (Nk = 4, Nr = 10)
Test Vector
FIPS 197 Pages 35 to 36

Cipher (Encrypt)

round[00].input: 00112233445566778899aabbccddeeff
round[00].k_sch: 000102030405060708090a0b0c0d0e0f
round[00].start: 00102030405060708090a0b0c0d0e0f0
round[01].s_box: 63cab7040953d051cd60e0e7ba70e18c
round[01].s_row: 6353e08c0960e104cd70b751bacad0e7
round[01].m_col: 5f72641557f5bc92f7be3b291db9f91a
round[01].k_sch: d6aa74fdd2af72fadaa678f1d6ab76fe
round[01].start: 89d810e8855ace682d1843d8cb128fe4
round[02].s_box: a761ca9b97be8b45d8ad1a611fc97369
round[02].s_row: a7be1a6997ad739bd8c9ca451f618b61
round[02].m_col: ff87968431d86a51645151fa773ad009
round[02].k_sch: b692cf0b643dbdf1be9bc5006830b3fe
round[02].start: 4915598f55e5d7a0daca94fa1f0a63f7
round[03].s_box: 3b59cb73fcd90ee05774222dc067fb68
round[03].s_row: 3bd92268fc74fb735767cbe0c0590e2d
round[03].m_col: 4c9c1e66f771f0762c3f868e534df256
round[03].k_sch: b6ff744ed2c2c9bf6c590cbf0469bf41
round[03].start: fa636a2825b339c940668a3157244d17
round[04].s_box: 2dfb02343f6d12dd09337ec75b36e3f0
round[04].s_row: 2d6d7ef03f33e334093602dd5bfb12c7
round[04].m_col: 6385b79ffc538df997be478e7547d691
round[04].k_sch: 47f7f7bc95353e03f96c32bcfd058dfd
round[04].start: 247240236966b3fa6ed2753288425b6c
round[05].s_box: 36400926f9336d2d9fb59d23c42c3950
round[05].s_row: 36339d50f9b539269f2c092dc4406d23
round[05].m_col: f4bcd45432e554d075f1d6c51dd03b3c
round[05].k_sch: 3caaa3e8a99f9deb50f3af57adf622aa
round[05].start: c81677bc9b7ac93b25027992b0261996
round[06].s_box: e847f56514dadde23f77b64fe7f7d490
round[06].s_row: e8dab6901477d4653ff7f5e2e747dd4f
round[06].m_col: 9816ee7400f87f556b2c049c8e5ad036
round[06].k_sch: 5e390f7df7a69296a7553dc10aa31f6b
round[06].start: c62fe109f75eedc3cc79395d84f9cf5d
round[07].s_box: b415f8016858552e4bb6124c5f998a4c
round[07].s_row: b458124c68b68a014b99f82e5f15554c
round[07].m_col: c57e1c159a9bd286f05f4be098c63439
round[07].k_sch: 14f9701ae35fe28c440adf4d4ea9c026
round[07].start: d1876c0f79c4300ab45594add66ff41f
round[08].s_box: 3e175076b61c04678dfc2295f6a8bfc0
round[08].s_row: 3e1c22c0b6fcbf768da85067f6170495
round[08].m_col: baa03de7a1f9b56ed5512cba5f414d23
round[08].k_sch: 47438735a41c65b9e016baf4aebf7ad2
round[08].start: fde3bad205e5d0d73547964ef1fe37f1
round[09].s_box: 5411f4b56bd9700e96a0902fa1bb9aa1
round[09].s_row: 54d990a16ba09ab596bbf40ea111702f
round[09].m_col: e9f74eec023020f61bf2ccf2353c21c7
round[09].k_sch: 549932d1f08557681093ed9cbe2c974e
round[09].start: bd6e7c3df2b5779e0b61216e8b10b689
round[10].s_box: 7a9f102789d5f50b2beffd9f3dca4ea7
round[10].s_row: 7ad5fda789ef4e272bca100b3d9ff59f
round[10].k_sch: 13111d7fe3944a17f307a78b4d2b30c5
round[10].output: 69c4e0d86a7b0430d8cdb78070b4c55a

AES-128 (Nk = 4, Nr = 10)
Test Vector
FIPS 197 Pages 36 to 37

Cipher (Decrypt)

round[10].start: 69c4e0d86a7b0430d8cdb78070b4c55a
round[10].k_sch: 13111d7fe3944a17f307a78b4d2b30c5
round[09].s_row: 7a9f102789d5f50b2beffd9f3dca4ea7
round[09].s_box: bd6e7c3df2b5779e0b61216e8b10b689
round[09].k_sch: 549932d1f08557681093ed9cbe2c974e
round[09].start: 54d990a16ba09ab596bbf40ea111702f
round[08].s_row: 5411f4b56bd9700e96a0902fa1bb9aa1
round[08].s_box: fde3bad205e5d0d73547964ef1fe37f1
round[08].k_sch: 47438735a41c65b9e016baf4aebf7ad2
round[08].start: 3e1c22c0b6fcbf768da85067f6170495
round[07].s_row: 3e175076b61c04678dfc2295f6a8bfc0
round[07].s_box: d1876c0f79c4300ab45594add66ff41f
round[07].k_sch: 14f9701ae35fe28c440adf4d4ea9c026
round[07].start: b458124c68b68a014b99f82e5f15554c
round[06].s_row: b415f8016858552e4bb6124c5f998a4c
round[06].s_box: c62fe109f75eedc3cc79395d84f9cf5d
round[06].k_sch: 5e390f7df7a69296a7553dc10aa31f6b
round[06].start: e8dab6901477d4653ff7f5e2e747dd4f
round[05].s_row: e847f56514dadde23f77b64fe7f7d490
round[05].s_box: c81677bc9b7ac93b25027992b0261996
round[05].k_sch: 3caaa3e8a99f9deb50f3af57adf622aa
round[05].start: 36339d50f9b539269f2c092dc4406d23
round[04].s_row: 36400926f9336d2d9fb59d23c42c3950
round[04].s_box: 247240236966b3fa6ed2753288425b6c
round[04].k_sch: 47f7f7bc95353e03f96c32bcfd058dfd
round[04].start: 2d6d7ef03f33e334093602dd5bfb12c7
round[03].s_row: 2dfb02343f6d12dd09337ec75b36e3f0
round[03].s_box: fa636a2825b339c940668a3157244d17
round[03].k_sch: b6ff744ed2c2c9bf6c590cbf0469bf41
round[03].start: 3bd92268fc74fb735767cbe0c0590e2d
round[02].s_row: 3b59cb73fcd90ee05774222dc067fb68
round[02].s_box: 4915598f55e5d7a0daca94fa1f0a63f7
round[02].k_sch: b692cf0b643dbdf1be9bc5006830b3fe
round[02].start: a7be1a6997ad739bd8c9ca451f618b61
round[01].s_row: a761ca9b97be8b45d8ad1a611fc97369
round[01].s_box: 89d810e8855ace682d1843d8cb128fe4
round[01].k_sch: d6aa74fdd2af72fadaa678f1d6ab76fe
round[01].start: 6353e08c0960e104cd70b751bacad0e7
round[00].s_row: 63cab7040953d051cd60e0e7ba70e18c
round[00].s_box: 00102030405060708090a0b0c0d0e0f0
round[00].k_sch: 000102030405060708090a0b0c0d0e0f
round[00].output: 00112233445566778899aabbccddeeff

AES Test 192 Bit Test Vector.JPG

NIST Standard Test Data
AES-192 (Nk = 6, Nr = 12)
Test Vector
FIPS 197 Pages 38 to 39

Cipher (Encrypt)

round[00].input: 00112233445566778899aabbccddeeff
round[00].k_sch: 000102030405060708090a0b0c0d0e0f
round[00].start: 00102030405060708090a0b0c0d0e0f0
round[01].s_box: 63cab7040953d051cd60e0e7ba70e18c
round[01].s_row: 6353e08c0960e104cd70b751bacad0e7
round[01].m_col: 5f72641557f5bc92f7be3b291db9f91a
round[01].k_sch: 10111213141516175846f2f95c43f4fe
round[01].start: 4f63760643e0aa85aff8c9d041fa0de4
round[02].s_box: 84fb386f1ae1ac977941dd70832dd769
round[02].s_row: 84e1dd691a41d76f792d389783fbac70
round[02].m_col: 9f487f794f955f662afc86abd7f1ab29
round[02].k_sch: 544afef55847f0fa4856e2e95c43f4fe
round[02].start: cb02818c17d2af9c62aa64428bb25fd7
round[03].s_box: 1f770c64f0b579deaaac432c3d37cf0e
round[03].s_row: 1fb5430ef0accf64aa370cde3d77792c
round[03].m_col: b7a53ecbbf9d75a0c40efc79b674cc11
round[03].k_sch: 40f949b31cbabd4d48f043b810b7b342
round[03].start: f75c7778a327c8ed8cfebfc1a6c37f53
round[04].s_box: 684af5bc0acce85564bb0878242ed2ed
round[04].s_row: 68cc08ed0abbd2bc642ef555244ae878
round[04].m_col: 7a1e98bdacb6d1141a6944dd06eb2d3e
round[04].k_sch: 58e151ab04a2a5557effb5416245080c
round[04].start: 22ffc916a81474416496f19c64ae2532
round[05].s_box: 9316dd47c2fa92834390a1de43e43f23
round[05].s_row: 93faa123c2903f4743e4dd83431692de
round[05].m_col: aaa755b34cffe57cef6f98e1f01c13e6
round[05].k_sch: 2ab54bb43a02f8f662e3a95d66410c08
round[05].start: 80121e0776fd1d8a8d8c31bc965d1fee
round[06].s_box: cdc972c53854a47e5d64c765904cc028
round[06].s_row: cd54c7283864c0c55d4c727e90c9a465
round[06].m_col: 921f748fd96e937d622d7725ba8ba50c
round[06].k_sch: f501857297448d7ebdf1c6ca87f33e3c
round[06].start: 671ef1fd4e2a1e03dfdcb1ef3d789b30
round[07].s_box: 8572a1542fe5727b9e86c8df27bc1404
round[07].s_row: 85e5c8042f8614549ebca17b277272df
round[07].m_col: e913e7b18f507d4b227ef652758acbcc
round[07].k_sch: e510976183519b6934157c9ea351f1e0
round[07].start: 0c0370d00c01e622166b8accd6db3a2c
round[08].s_box: fe7b5170fe7c8e93477f7e4bf6b98071
round[08].s_row: fe7c7e71fe7f807047b95193f67b8e4b
round[08].m_col: 6cf5edf996eb0a069c4ef21cbfc25762
round[08].k_sch: 1ea0372a995309167c439e77ff12051e
round[08].start: 7255dad30fb80310e00d6c6b40d0527c
round[09].s_box: 40fc5766766c7bcae1d7507f09700010
round[09].s_row: 406c501076d70066e17057ca09fc7b7f
round[09].m_col: 7478bcdce8a50b81d4327a9009188262
round[09].k_sch: dd7e0e887e2fff68608fc842f9dcc154
round[09].start: a906b254968af4e9b4bdb2d2f0c44336
round[10].s_box: d36f3720907ebf1e8d7a37b58c1c1a05
round[10].s_row: d37e3705907a1a208d1c371e8c6fbfb5
round[10].m_col: 0d73cc2d8f6abe8b0cf2dd9bb83d422e
round[10].k_sch: 859f5f237a8d5a3dc0c02952beefd63a
round[10].start: 88ec930ef5e7e4b6cc32f4c906d29414
round[11].s_box: c4cedcabe694694e4b23bfdd6fb522fa
round[11].s_row: c494bffae62322ab4bb5dc4e6fce69dd
round[11].m_col: 71d720933b6d677dc00b8f28238e0fb7
round[11].k_sch: de601e7827bcdf2ca223800fd8aeda32
round[11].start: afb73eeb1cd1b85162280f27fb20d585
round[12].s_box: 79a9b2e99c3e6cd1aa3476cc0fb70397
round[12].s_row: 793e76979c3403e9aab7b2d10fa96ccc
round[12].k_sch: a4970a331a78dc09c418c271e3a41d5d
round[12].output: dda97ca4864cdfe06eaf70a0ec0d7191

AES-192 (Nk = 6, Nr = 12)
Test Vector
FIPS 197 Pages 39 to 40

Inverse Cipher (Decrypt)

round[12].start: dda97ca4864cdfe06eaf70a0ec0d7191
round[12].k_sch: a4970a331a78dc09c418c271e3a41d5d
round[11].s_row: 79a9b2e99c3e6cd1aa3476cc0fb70397
round[11].s_box: afb73eeb1cd1b85162280f27fb20d585
round[11].k_sch: de601e7827bcdf2ca223800fd8aeda32
round[11].start: c494bffae62322ab4bb5dc4e6fce69dd
round[10].s_row: c4cedcabe694694e4b23bfdd6fb522fa
round[10].s_box: 88ec930ef5e7e4b6cc32f4c906d29414
round[10].k_sch: 859f5f237a8d5a3dc0c02952beefd63a
round[10].start: d37e3705907a1a208d1c371e8c6fbfb5
round[09].s_row: d36f3720907ebf1e8d7a37b58c1c1a05
round[09].s_box: a906b254968af4e9b4bdb2d2f0c44336
round[09].k_sch: dd7e0e887e2fff68608fc842f9dcc154
round[09].start: 406c501076d70066e17057ca09fc7b7f
round[08].s_row: 40fc5766766c7bcae1d7507f09700010
round[08].s_box: 7255dad30fb80310e00d6c6b40d0527c
round[08].k_sch: 1ea0372a995309167c439e77ff12051e
round[08].start: fe7c7e71fe7f807047b95193f67b8e4b
round[07].s_row: fe7b5170fe7c8e93477f7e4bf6b98071
round[07].s_box: 0c0370d00c01e622166b8accd6db3a2c
round[07].k_sch: e510976183519b6934157c9ea351f1e0
round[07].start: 85e5c8042f8614549ebca17b277272df
round[06].s_row: 8572a1542fe5727b9e86c8df27bc1404
round[06].s_box: 671ef1fd4e2a1e03dfdcb1ef3d789b30
round[06].k_sch: f501857297448d7ebdf1c6ca87f33e3c
round[06].start: cd54c7283864c0c55d4c727e90c9a465
round[05].s_row: cdc972c53854a47e5d64c765904cc028
round[05].s_box: 80121e0776fd1d8a8d8c31bc965d1fee
round[05].k_sch: 2ab54bb43a02f8f662e3a95d66410c08
round[05].start: 93faa123c2903f4743e4dd83431692de
round[04].s_row: 9316dd47c2fa92834390a1de43e43f23
round[04].s_box: 22ffc916a81474416496f19c64ae2532
round[04].k_sch: 58e151ab04a2a5557effb5416245080c
round[04].start: 68cc08ed0abbd2bc642ef555244ae878
round[03].s_row: 684af5bc0acce85564bb0878242ed2ed
round[03].s_box: f75c7778a327c8ed8cfebfc1a6c37f53
round[03].k_sch: 40f949b31cbabd4d48f043b810b7b342
round[03].start: 1fb5430ef0accf64aa370cde3d77792c
round[02].s_row: 1f770c64f0b579deaaac432c3d37cf0e
round[02].s_box: cb02818c17d2af9c62aa64428bb25fd7
round[02].k_sch: 544afef55847f0fa4856e2e95c43f4fe
round[02].start: 84e1dd691a41d76f792d389783fbac70
round[01].s_row: 84fb386f1ae1ac977941dd70832dd769
round[01].s_box: 4f63760643e0aa85aff8c9d041fa0de4
round[01].k_sch: 10111213141516175846f2f95c43f4fe
round[01].start: 6353e08c0960e104cd70b751bacad0e7
round[00].s_row: 63cab7040953d051cd60e0e7ba70e18c
round[00].s_box: 00102030405060708090a0b0c0d0e0f0
round[00].k_sch: 000102030405060708090a0b0c0d0e0f
round[00].output: 00112233445566778899aabbccddeeff

AES Test 256 Bit Test Vector

NIST Standard Test Data
AES-256 (Nk = 8, Nr = 14)
Test Vector
FIPS 197 Pages 42 to 43

Cipher (Encrypt)

round[00].input: 00112233445566778899aabbccddeeff
round[00].k_sch: 000102030405060708090a0b0c0d0e0f
round[00].start: 00102030405060708090a0b0c0d0e0f0
round[01].s_box: 63cab7040953d051cd60e0e7ba70e18c
round[01].s_row: 6353e08c0960e104cd70b751bacad0e7
round[01].m_col: 5f72641557f5bc92f7be3b291db9f91a
round[01].k_sch: 101112131415161718191a1b1c1d1e1f
round[01].start: 4f63760643e0aa85efa7213201a4e705
round[02].s_box: 84fb386f1ae1ac97df5cfd237c49946b
round[02].s_row: 84e1fd6b1a5c946fdf4938977cfbac23
round[02].m_col: bd2a395d2b6ac438d192443e615da195
round[02].k_sch: a573c29fa176c498a97fce93a572c09c
round[02].start: 1859fbc28a1c00a078ed8aadc42f6109
round[03].s_box: adcb0f257e9c63e0bc557e951c15ef01
round[03].s_row: ad9c7e017e55ef25bc150fe01ccb6395
round[03].m_col: 810dce0cc9db8172b3678c1e88a1b5bd
round[03].k_sch: 1651a8cd0244beda1a5da4c10640bade
round[03].start: 975c66c1cb9f3fa8a93a28df8ee10f63
round[04].s_box: 884a33781fdb75c2d380349e19f876fb
round[04].s_row: 88db34fb1f807678d3f833c2194a759e
round[04].m_col: b2822d81abe6fb275faf103a078c0033
round[04].k_sch: ae87dff00ff11b68a68ed5fb03fc1567
round[04].start: 1c05f271a417e04ff921c5c104701554
round[05].s_box: 9c6b89a349f0e18499fda678f2515920
round[05].s_row: 9cf0a62049fd59a399518984f26be178
round[05].m_col: aeb65ba974e0f822d73f567bdb64c877
round[05].k_sch: 6de1f1486fa54f9275f8eb5373b8518d
round[05].start: c357aae11b45b7b0a2c7bd28a8dc99fa
round[06].s_box: 2e5bacf8af6ea9e73ac67a34c286ee2d
round[06].s_row: 2e6e7a2dafc6eef83a86ace7c25ba934
round[06].m_col: b951c33c02e9bd29ae25cdb1efa08cc7
round[06].k_sch: c656827fc9a799176f294cec6cd5598b
round[06].start: 7f074143cb4e243ec10c815d8375d54c
round[07].s_box: d2c5831a1f2f36b278fe0c4cec9d0329
round[07].s_row: d22f0c291ffe031a789d83b2ecc5364c
round[07].m_col: ebb19e1c3ee7c9e87d7535e9ed6b9144
round[07].k_sch: 3de23a75524775e727bf9eb45407cf39
round[07].start: d653a4696ca0bc0f5acaab5db96c5e7d
round[08].s_box: f6ed49f950e06576be74624c565058ff
round[08].s_row: f6e062ff507458f9be50497656ed654c
round[08].m_col: 5174c8669da98435a8b3e62ca974a5ea
round[08].k_sch: 0bdc905fc27b0948ad5245a4c1871c2f
round[08].start: 5aa858395fd28d7d05e1a38868f3b9c5
round[09].s_box: bec26a12cfb55dff6bf80ac4450d56a6
round[09].s_row: beb50aa6cff856126b0d6aff45c25dc4
round[09].m_col: 0f77ee31d2ccadc05430a83f4ef96ac3
round[09].k_sch: 45f5a66017b2d387300d4d33640a820a
round[09].start: 4a824851c57e7e47643de50c2af3e8c9
round[10].s_box: d61352d1a6f3f3a04327d9fee50d9bdd
round[10].s_row: d6f3d9dda6279bd1430d52a0e513f3fe
round[10].m_col: bd86f0ea748fc4f4630f11c1e9331233
round[10].k_sch: 7ccff71cbeb4fe5413e6bbf0d261a7df
round[10].start: c14907f6ca3b3aa070e9aa313b52b5ec
round[11].s_box: 783bc54274e280e0511eacc7e200d5ce
round[11].s_row: 78e2acce741ed5425100c5e0e23b80c7
round[11].m_col: af8690415d6e1dd387e5fbedd5c89013
round[11].k_sch: f01afafee7a82979d7a5644ab3afe640
round[11].start: 5f9c6abfbac634aa50409fa766677653
round[12].s_box: cfde0208f4b418ac5309db5c338538ed
round[12].s_row: cfb4dbedf4093808538502ac33de185c
round[12].m_col: 7427fae4d8a695269ce83d315be0392b
round[12].k_sch: 2541fe719bf500258813bbd55a721c0a
round[12].start: 516604954353950314fb86e401922521
round[13].s_box: d133f22a1aed2a7bfa0f44697c4f3ffd
round[13].s_row: d1ed44fd1a0f3f2afa4ff27b7c332a69
round[13].m_col: 2c21a820306f154ab712c75eee0da04f
round[13].k_sch: 4e5a6699a9f24fe07e572baacdf8cdea
round[13].start: 627bceb9999d5aaac945ecf423f56da5
round[14].s_box: aa218b56ee5ebeacdd6ecebf26e63c06
round[14].s_row: aa5ece06ee6e3c56dde68bac2621bebf
round[14].k_sch: 24fc79ccbf0979e9371ac23c6d68de36
round[14].output: 8ea2b7ca516745bfeafc49904b496089

AES-256 (Nk = 8, Nr = 14)
Test Vector
FIPS 197 Pages 43 to 44

Inverse Cipher (Decrypt)

round[14].start: 8ea2b7ca516745bfeafc49904b496089
round[14].k_sch: 24fc79ccbf0979e9371ac23c6d68de36
round[13].s_row: aa218b56ee5ebeacdd6ecebf26e63c06
round[13].s_box: 627bceb9999d5aaac945ecf423f56da5
round[13].k_sch: 4e5a6699a9f24fe07e572baacdf8cdea
round[13].start: d1ed44fd1a0f3f2afa4ff27b7c332a69
round[12].s_row: d133f22a1aed2a7bfa0f44697c4f3ffd
round[12].s_box: 516604954353950314fb86e401922521
round[12].k_sch: 2541fe719bf500258813bbd55a721c0a
round[12].start: cfb4dbedf4093808538502ac33de185c
round[11].s_row: cfde0208f4b418ac5309db5c338538ed
round[11].s_box: 5f9c6abfbac634aa50409fa766677653
round[11].k_sch: f01afafee7a82979d7a5644ab3afe640
round[11].start: 78e2acce741ed5425100c5e0e23b80c7
round[10].s_row: 783bc54274e280e0511eacc7e200d5ce
round[10].s_box: c14907f6ca3b3aa070e9aa313b52b5ec
round[10].k_sch: 7ccff71cbeb4fe5413e6bbf0d261a7df
round[10].start: d6f3d9dda6279bd1430d52a0e513f3fe
round[09].s_row: d61352d1a6f3f3a04327d9fee50d9bdd
round[09].s_box: 4a824851c57e7e47643de50c2af3e8c9
round[09].k_sch: 45f5a66017b2d387300d4d33640a820a
round[09].start: beb50aa6cff856126b0d6aff45c25dc4
round[08].s_row: bec26a12cfb55dff6bf80ac4450d56a6
round[08].s_box: 5aa858395fd28d7d05e1a38868f3b9c5
round[08].k_sch: 0bdc905fc27b0948ad5245a4c1871c2f
round[08].start: f6e062ff507458f9be50497656ed654c
round[07].s_row: f6ed49f950e06576be74624c565058ff
round[07].s_box: d653a4696ca0bc0f5acaab5db96c5e7d
round[07].k_sch: 3de23a75524775e727bf9eb45407cf39
round[07].start: d22f0c291ffe031a789d83b2ecc5364c
round[06].s_row: d2c5831a1f2f36b278fe0c4cec9d0329
round[06].s_box: 7f074143cb4e243ec10c815d8375d54c
round[06].k_sch: c656827fc9a799176f294cec6cd5598b
round[06].start: 2e6e7a2dafc6eef83a86ace7c25ba934
round[05].s_row: 2e5bacf8af6ea9e73ac67a34c286ee2d
round[05].s_box: c357aae11b45b7b0a2c7bd28a8dc99fa
round[05].k_sch: 6de1f1486fa54f9275f8eb5373b8518d
round[05].start: 9cf0a62049fd59a399518984f26be178
round[04].s_row: 9c6b89a349f0e18499fda678f2515920
round[04].s_box: 1c05f271a417e04ff921c5c104701554
round[04].k_sch: ae87dff00ff11b68a68ed5fb03fc1567
round[04].start: 88db34fb1f807678d3f833c2194a759e
round[03].s_row: 884a33781fdb75c2d380349e19f876fb
round[03].s_box: 975c66c1cb9f3fa8a93a28df8ee10f63
round[03].k_sch: 1651a8cd0244beda1a5da4c10640bade
round[03].start: ad9c7e017e55ef25bc150fe01ccb6395
round[02].s_row: adcb0f257e9c63e0bc557e951c15ef01
round[02].s_box: 1859fbc28a1c00a078ed8aadc42f6109
round[02].k_sch: a573c29fa176c498a97fce93a572c09c
round[02].start: 84e1fd6b1a5c946fdf4938977cfbac23
round[01].s_row: 84fb386f1ae1ac97df5cfd237c49946b
round[01].s_box: 4f63760643e0aa85efa7213201a4e705
round[01].k_sch: 101112131415161718191a1b1c1d1e1f
round[01].start: 6353e08c0960e104cd70b751bacad0e7
round[00].s_row: 63cab7040953d051cd60e0e7ba70e18c
round[00].s_box: 00102030405060708090a0b0c0d0e0f0
round[00].k_sch: 000102030405060708090a0b0c0d0e0f
round[00].output: 00112233445566778899aabbccddeeff

Machine Cryptanalysis of Basic Cryptosystems by James Pate Williams, Jr. BA, BS, MSwE, PhD

In Winter and Spring 2018 I wrote a simple C# computer program to perform machine cryptanalysis of the following basic (elementary and easily breakable) cryptosystems:

  1. Affine Cipher Operating on Monographs and Digraphs
  2. Matrix Cipher
  3. Mono-alphabetic Cipher
  4. n-Rotor with Shifting Polyalphabetic Cipher

The key ingredient in this program is a relatively extensive English language dictionary.

This slideshow requires JavaScript.