Forum Discussion

CLyna's avatar
CLyna
Icon for New Contributor rankNew Contributor
6 years ago

Creating New values for ten rounds

I have been working on creating a key generator module for a AES algorithm. Which uses round constant values that change for the ten rounds of encryption. The signal SubroutineWord is created from the S-box array and is 32 bits in size, I have written a line of code but am unsure if it functioning correctly can someone help me out please.

NewWord <= SubRoutineWord xor (RoundConstantV(conv_integer(RoundNum(5 downto 2 ))) & b"000000") when RoundNum(1 downto 0) = "00"

else

Word32(3);

I am unsure if i am right. RoundNum is a constant to count how many rounds that there is. In total there will be ten. Any help would be great thanks in advance.

Ciaran

1 Reply

  • JohnT_Altera's avatar
    JohnT_Altera
    Icon for Regular Contributor rankRegular Contributor
    HI, I would recommend you to try to run simulation to check if you are writing it correctly or not.