Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

please help in Rc5 Algorithm

Status
Not open for further replies.

sara_123

Newbie level 6
Joined
Apr 25, 2008
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,373
Hi all,

i am developing a IEEE paper Of rc5 Algorithm in verilog. I am stuck in the key expansion unit. can any body help me with some documents or code in developing key expansion unit in rc5 algorithm in verilog. pleaseee helpp.....

thank you in advance..

sara..
 

RC5 has a variable-length secret cryptographic key specied by parameters b and K:
b The number of bytes in the secret key K. Allowable values of b are 0, 1,
..., 255.
K The b-byte secret key: K[0], K[1], ..., K[b 1]

RC5-
w=r=b. For example, RC5-32/16/10has 32-bit words, 16 rounds,
a 10-byte (80-bit) secret key variable, and an expanded key table of 2(16+1) = 34
words. The key-expansion algorithm initializes S from the user’s given secret key parameter K.


Denition of the Magic Constants The key-expansion algorithm uses two
word-sized binary constants P and Q .
They are dened for arbitrary w as
follows:p= Odd((e 2)2 (1)
Q = Odd(( 1)2 (2)
where
e = 2:718281828459::: (base of natural logarithms)
= 1:618033988749::: (golden ratio)
 

ya i got the details regarding the blocks in the rc5 algorithm, i have a doubt in key mixing in the key expansion unit..
the pseudo code is

i=j=0;
A=B=0;
do 3*max(t,c)times;
A=(s+A+B)<<<3;
B=(l[j]+A+B)<<<(A+B);
i=(i+1)mod (t);
j=(j+1)mod(c);

here when finding B have to left rotate it A+B times.A+B is coming to a huge value and it is going on in a loop...can any body help how to design this above pseudo code in verilog......pleaseeee....help me..
 

for how much bit you r doing this algorithm.??...
to rotate with any number of bit to left or right by the amount by the least significant bits u can shift .....
 

Hi,

A and B are 32 bits. i want to rotate (l[j]+A+B) value (A+B) times.since A and B are 32 bit . its coming to a big value. and it is going on in loop.can any one provide any example code related to this..

Thanks in advance
 

Hi........

here A and B are 32 bits.to rotate (l[j]+A+B) value (A+B) times ...
use the result of addition (A+B) .in this addition u have to use its least significant bits
i.e. its 5 bits .with this five bit u can rotate

try it...
Best Luck
 

hi,

So do you mean after adding A and B, have to take 5 least significant bit from the result and can rotate (l[j]+A+B) that 5 bit times...
and one more doubt how to give a text as input in verilog.


plzzz help....

Thank you in advance
 

Yes use 5 least significant bit from Addition result
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top