dess.cpp (55714) | dess.cpp (76866) |
---|---|
1// 2// gettsc.inl 3// 4// gives access to the Pentium's (secret) cycle counter 5// 6// This software was written by Leonard Janke (janke@unixg.ubc.ca) 7// in 1996-7 and is entered, by him, into the public domain. 8 --- 31 unchanged lines hidden (view full) --- 40 unsigned long s1,s2,e1,e2; 41 unsigned long data[2]; 42 int i,j; 43 44 for (j=0; j<6; j++) 45 { 46 for (i=0; i<1000; i++) /**/ 47 { | 1// 2// gettsc.inl 3// 4// gives access to the Pentium's (secret) cycle counter 5// 6// This software was written by Leonard Janke (janke@unixg.ubc.ca) 7// in 1996-7 and is entered, by him, into the public domain. 8 --- 31 unchanged lines hidden (view full) --- 40 unsigned long s1,s2,e1,e2; 41 unsigned long data[2]; 42 int i,j; 43 44 for (j=0; j<6; j++) 45 { 46 for (i=0; i<1000; i++) /**/ 47 { |
48 des_encrypt(&data[0],key,1); | 48 des_encrypt1(&data[0],key,1); |
49 GetTSC(s1); | 49 GetTSC(s1); |
50 des_encrypt(&data[0],key,1); 51 des_encrypt(&data[0],key,1); 52 des_encrypt(&data[0],key,1); | 50 des_encrypt1(&data[0],key,1); 51 des_encrypt1(&data[0],key,1); 52 des_encrypt1(&data[0],key,1); |
53 GetTSC(e1); 54 GetTSC(s2); | 53 GetTSC(e1); 54 GetTSC(s2); |
55 des_encrypt(&data[0],key,1); 56 des_encrypt(&data[0],key,1); 57 des_encrypt(&data[0],key,1); 58 des_encrypt(&data[0],key,1); | 55 des_encrypt1(&data[0],key,1); 56 des_encrypt1(&data[0],key,1); 57 des_encrypt1(&data[0],key,1); 58 des_encrypt1(&data[0],key,1); |
59 GetTSC(e2); | 59 GetTSC(e2); |
60 des_encrypt(&data[0],key,1); | 60 des_encrypt1(&data[0],key,1); |
61 } 62 63 printf("des %d %d (%d)\n", 64 e1-s1,e2-s2,((e2-s2)-(e1-s1))); 65 } 66 } 67 | 61 } 62 63 printf("des %d %d (%d)\n", 64 e1-s1,e2-s2,((e2-s2)-(e1-s1))); 65 } 66 } 67 |