Changeset 752
- Timestamp:
- 12/08/09 22:17:58 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/reader-nagra.c
r745 r752 225 225 { 226 226 memcpy(plainDT08RSA, reader[ridx].rsa_mod, 64); 227 memcpy(signature,reader[ridx]. hexserial, 4);227 memcpy(signature,reader[ridx].nagra_boxkey, 8); 228 228 } 229 229 … … 254 254 //cs_debug("[nagra-reader] DT08 decrypted $2a data: %s", cs_hexdump (1, &negot[32], 32)); 255 255 256 memcpy(tmp, negot, 64); 256 memcpy(tmp, negot, 64); 257 257 ReverseMem(tmp, 64); 258 258 259 259 // build sessionkey 260 260 // first halve is IDEA Hashed in chuncs of 8 bytes using the Signature1 from dt08 calc, CamID-Inv.CamID(16 bytes key) the results are the First 8 bytes of the Session key 261 memcpy(idea1, signature, 8); memcpy(idea1+8, reader[ridx].hexserial, 4); idea1[12] = ~reader[ridx].hexserial[0]; idea1[13] = ~reader[ridx].hexserial[1]; idea1[14] = ~reader[ridx].hexserial[2]; idea1[15] = ~reader[ridx].hexserial[3]; 261 memcpy(idea1, signature, 8); 262 memcpy(idea1+8, reader[ridx].hexserial, 4); 263 idea1[12] = ~reader[ridx].hexserial[0]; idea1[13] = ~reader[ridx].hexserial[1]; idea1[14] = ~reader[ridx].hexserial[2]; idea1[15] = ~reader[ridx].hexserial[3]; 264 262 265 Signature(sign1, idea1, tmp, 32); 263 266 memcpy(idea2,sign1,8); memcpy(idea2+8,sign1,8); … … 583 586 584 587 } 588 if (is_pure_nagra==1) 589 { 590 cs_sleepms(50); 591 } 585 592 CamStateRequest(); 593 if (is_pure_nagra==1) 594 { 595 cs_sleepms(50); 596 } 586 597 if (HAS_CW && do_cmd(0x1C,0x02,0x9C,0x36,NULL)) 587 598 { … … 591 602 memset(v,0,sizeof(v)); 592 603 idea_cbc_encrypt(&cta_res[4],er->cw+8,8,&ksSession,v,IDEA_DECRYPT); 593 594 604 if ((memcmp(prv3411,&reader[ridx].prid[0],4)==0) || (memcmp(prv0401,&reader[ridx].prid[0],4)==0)) 595 605 { … … 599 609 memcpy(&er->cw[8],&tt[0],8); 600 610 } 601 602 611 post_process(); 603 612 return (1);
Note:
See TracChangeset
for help on using the changeset viewer.