Thread: GMP function
View Single Post
  #3  
Old 06-16-2011, 05:56
Kerlingen Kerlingen is offline
VIP
 
Join Date: Feb 2011
Posts: 338
Rept. Given: 0
Rept. Rcvd 278 Times in 100 Posts
Thanks Given: 0
Thanks Rcvd at 358 Times in 110 Posts
Kerlingen Reputation: 200-299 Kerlingen Reputation: 200-299 Kerlingen Reputation: 200-299
Code:
_C = D + A - ROR(B, 5)
_A = ROR(C, 15) xor B
_B = C + D
_D = A - ROR(B, 5) + ROR(C, 15) xor B
A = _A
B = _B
C = _C
D = _D
This looks like the inner loop of some hash or crypto function.

A "mpz_struct" doesn't fit either. Both structures contain a pointer and XORing pointers isn't the best idea, even if adding or subtracting is sometimes used with pointers. Do you have a link to the code you're analysing? Just this one code fragment doesn't show much.
Reply With Quote