]> www.vanbest.org Git - sasc-ng.git/commitdiff
nagra: INT map39/3a
authoranon <unknown>
Sat, 14 Jun 2008 09:30:02 +0000 (17:30 +0800)
committeranon <unknown>
Sat, 14 Jun 2008 09:30:02 +0000 (17:30 +0800)
systems/nagra/nagra2.c

index b872ff4ac5557ebe7f8aa0314b7f47d34e7552b7..e68e6d0de6e20d52bdf95e85eb42166dbd0e46fc 100644 (file)
@@ -758,7 +758,20 @@ bool cMapCore::MapGeneric(int f, unsigned char *data, int l)
 
     case 0x39:
     case 0x3a:
-      MonInit();
+      AddMapCycles(512);
+      WS_START(1);
+      MakeJ0(J,D);
+      AddMapCycles(256);
+      WS_END();
+      AddMapCycles(340);
+      if(!BN_is_zero(D)) {
+        BN_zero(I);
+        BN_set_bit(I,68*wordsize);
+        BN_mod(B,I,D,ctx);
+        }
+      AddMapCycles(320);
+      for(int i=0; i<4; i++) MonMul(B,B,B);
+
       if(f==0x39) I.GetLE(data,wordsize<<3);
       MonMul(B,(f==0x39?I:A),B);
       MonMul(B,A,B);