OpenCores
no use no use 1/1 no use no use
DES Core
by worldy1 on Mar 13, 2012
worldy1
Posts: 2
Joined: Jul 24, 2010
Last seen: Apr 15, 2024
hello my friends
i need to ask you about the DES core which is shown in the projects section in this link

http://opencores.org/project,des

i tested it and it's OK!.
At the area-optimization implementation, i need to understand an issue which is related to the generation of Sub-keys for the 16 round!. the question is where are the permutation choice (PC-1) and the permutation choice (PC-2)? i checked the generated sub keys and they exactly the same ones i have (an pre calculated example!).
is it an another way to generate the sub-keys without making permutation processes ??
i see just assignments statements which gives you the sub-keys like this

assign K1[1] = decryptH ? K[40] : K[47];
assign K1[2] = decryptH ? K[4] : K[11];
assign K1[3] = decryptH ? K[19] : K[26];
assign K1[4] = decryptH ? K[53] : K[3] ;
assign K1[5] = decryptH ? K[6] : K[13];
assign K1[6] = decryptH ? K[34] : K[41];
assign K1[7] = decryptH ? K[20] : K[27];
assign K1[8] = decryptH ? K[24] : K[6] ;
assign K1[9] = decryptH ? K[47] : K[54];
assign K1[10] = decryptH ? K[41] : K[48];
assign K1[11] = decryptH ? K[32] : K[39];
assign K1[12] = decryptH ? K[12] : K[19];
assign K1[13] = decryptH ? K[46] : K[53];
assign K1[14] = decryptH ? K[18] : K[25];
assign K1[15] = decryptH ? K[26] : K[33];
assign K1[16] = decryptH ? K[27] : K[34];
assign K1[17] = decryptH ? K[10] : K[17];
assign K1[18] = decryptH ? K[55] : K[5] ;
assign K1[19] = decryptH ? K[54] : K[4] ;
assign K1[20] = decryptH ? K[48] : K[55];
assign K1[21] = decryptH ? K[17] : K[24];
assign K1[22] = decryptH ? K[25] : K[32];
assign K1[23] = decryptH ? K[33] : K[40];
assign K1[24] = decryptH ? K[13] : K[20];
assign K1[25] = decryptH ? K[29] : K[36];
assign K1[26] = decryptH ? K[51] : K[31];
assign K1[27] = decryptH ? K[14] : K[21];
assign K1[28] = decryptH ? K[1] : K[8] ;
assign K1[29] = decryptH ? K[16] : K[23];
assign K1[30] = decryptH ? K[45] : K[52];
assign K1[31] = decryptH ? K[7] : K[14];
assign K1[32] = decryptH ? K[22] : K[29];
assign K1[33] = decryptH ? K[44] : K[51];
assign K1[34] = decryptH ? K[2] : K[9] ;
assign K1[35] = decryptH ? K[28] : K[35];
assign K1[36] = decryptH ? K[23] : K[30];
assign K1[37] = decryptH ? K[50] : K[2] ;
assign K1[38] = decryptH ? K[30] : K[37];
assign K1[39] = decryptH ? K[15] : K[22];
assign K1[40] = decryptH ? K[52] : K[0] ;
assign K1[41] = decryptH ? K[35] : K[42];
assign K1[42] = decryptH ? K[31] : K[38];
assign K1[43] = decryptH ? K[9] : K[16];
assign K1[44] = decryptH ? K[36] : K[43];
assign K1[45] = decryptH ? K[37] : K[44];
assign K1[46] = decryptH ? K[49] : K[1] ;
assign K1[47] = decryptH ? K[0] : K[7] ;
assign K1[48] = decryptH ? K[21] : K[28];

any help to understand this point ???
thanks in advanced :)
RE: DES Core
by worldy1 on Apr 4, 2012
worldy1
Posts: 2
Joined: Jul 24, 2010
Last seen: Apr 15, 2024
please guys help me !!
RE: DES Core
by srmcqueen on Apr 5, 2012
srmcqueen
Posts: 3
Joined: Aug 17, 2003
Last seen: Aug 26, 2014
please guys help me !!


The statements you listed look like C code. In any case, each quoted statement chooses the value of one bit in the round key depending on whether the current operation is decrypt or encrypt. As you know, the key sequence for encryption is the reverse of the key sequence for decryption.

In software, we would find it most convenient to set up the first round key, perform an encryption round, then repeat. In hardware, we find that it is cheaper, easier and faster to set up an array of vector registers and create all the round keys at once. Then we use a multiplexer array to select the desired key for each round of processing. It is possible to use either technique in both software and hardware.

Without more context, I do not know which method is being used for the code you have quoted.
RE: DES Core
by salaharb on Oct 5, 2012
salaharb
Posts: 1
Joined: Jun 9, 2012
Last seen: Jun 8, 2013
Goood Question :(
how the key is generated without any PC-1 and PC-2 ?
is there any method or algorithm without using PC-1 and PC-2 ?

thanks
no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.