1 / 11

AES

AES. CS 465. Tim van der Horst Last Updated: 22 June, 2007. Programming Lab #1. Implement AES Use FIPS 197 as guide Everything in this tutorial but in more detail Pseudocode 20 pages of complete, step by step debugging information. Finite Fields. AES uses the finite field GF(2 8 )

Download Presentation

AES

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AES CS 465 Tim van der Horst Last Updated: 22 June, 2007

  2. Programming Lab #1 • Implement AES • Use FIPS 197 as guide • Everything in this tutorial but in more detail • Pseudocode • 20 pages of complete, step by step debugging information

  3. Finite Fields • AES uses the finite field GF(28) • b7x7 + b6x6 + b5x5 + b4x4 + b3x3 + b2x2 + b1x + b0 • {b7, b6, b5, b4, b3, b2, b1, b0} • Byte notation for the element: x6 + x5 + x + 1 • 0x7 + 1x6 + 1x5 + 0x4 + 0x3 + 0x2 + 1x + 1 • {01100011} – binary • {63} – hex • Has its own arithmetic operations • Addition • Multiplication

  4. Finite Field Arithmetic • Addition (XOR) • (x6 + x4 + x2 + x + 1) + (x7 + x + 1) = x7 + x6 + x4 + x2 • {01010111}  {10000011} = {11010100} • {57}  {83} = {d4} • Multiplication is tricky

  5. Finite Field Multiplication () These cancel out (x6 + x4 + x2 + x +1) (x7 + x +1) = x13 + x11 + x9 + x8 + x7 +x7 + x5 + x3 + x2 + x+ x6 + x4 + x2 + x+1 = x13 + x11 + x9 + x8 + x6 + x5 + x4 + x3 +1 and x13 + x11 + x9 + x8 + x6 + x5 + x4 + x3 +1 modulo ( x8 + x4 + x3 + x +1) = x7 + x6 +1. Irreducible Polynomial

  6. Efficient Finite Field Multiply • There’s a better way • xtime() – very efficiently multiplies its input by {02} • Multiplication by higher powers can be accomplished through repeat application of xtime()

  7. Efficient Finite Field Multiply Example: {57}  {13} {57}  {02} = xtime({57}) = {ae} {57}  {04} = xtime({ae}) = {47} {57}  {08} = xtime({47}) = {8e} {57}  {10} = xtime({8e}) = {07} {57}  {13}= {57}  ({01}  {02}  {10}) = {57}  ({01} {02} {10}) = ({57}  {01})  ({57}  {02})  ({57}  {10}) = {57}  {ae}  {07} = {fe}

  8. AES Parameters • Nb– Number of columns in the State • For AES, Nb = 4 • Nk – Number of 32-bit words in the Key • For AES, Nk = 4, 6, or 8 • Nr – Number of rounds (function of Nb and Nk) • For AES, Nr = 10, 12, or 14

  9. AES methods • Convert to state array • Transformations (and their inverses) • AddRoundKey • SubBytes • ShiftRows • MixColumns • Key Expansion

  10. Convert to State Array 12 4 8 0 1 5 9 13 2 14 6 10 3 7 11 15 Input block: =

  11. Inner Workings • See Flash demo URL on course Lectures pages

More Related