Changes

68 bytes added ,  21:31, 8 February 2018
no edit summary
Line 1,325: Line 1,325:  
  ckeyreg(c4);
 
  ckeyreg(c4);
 
   
 
   
  // AES-128-ECB decrypt
+
  // AES-128-CBC decrypt
 
  if (mode == 0x00)
 
  if (mode == 0x00)
 
  {
 
  {
Line 1,337: Line 1,337:  
   cmov(c5, c3);                // Move c3 into c5
 
   cmov(c5, c3);                // Move c3 into c5
 
  }
 
  }
  else if (mode == 0x01) // AES-128-ECB encrypt
+
  else if (mode == 0x01) // AES-128-CBC encrypt
 
  {
 
  {
 
   // Create crypto script with 4 instructions
 
   // Create crypto script with 4 instructions
Line 1,356: Line 1,356:  
   cenc(c5, c5);                // Encrypt from c5 into c5
 
   cenc(c5, c5);                // Encrypt from c5 into c5
 
  }
 
  }
  else if (mode == 0x03) // AES-128-ECB decrypt (no IV)
+
  else if (mode == 0x03) // AES-128-ECB decrypt
 
  {
 
  {
 
   // Create crypto script with 3 instructions
 
   // Create crypto script with 3 instructions
Line 1,365: Line 1,365:  
   cxsout(c5);                  // Write 0x10 bytes into crypto stream from c5
 
   cxsout(c5);                  // Write 0x10 bytes into crypto stream from c5
 
  }
 
  }
  else if (mode == 0x04) // AES-128-ECB encrypt (no IV)
+
  else if (mode == 0x04) // AES-128-ECB encrypt
 
  {
 
  {
 
   // Create crypto script with 3 instructions
 
   // Create crypto script with 3 instructions
Line 1,602: Line 1,602:  
<code>00000000: f5 3c XY e0    cchmod $cY $cX</code> - likely forces a change of permissions.
 
<code>00000000: f5 3c XY e0    cchmod $cY $cX</code> - likely forces a change of permissions.
   −
<code>00000000: f5 3c XY a8    c_unk $cY $cX</code> - unknown crypto operation.
+
<code>00000000: f5 3c XY a8    c_unk0 $cY $cX</code> - unknown crypto operation.
 +
 
 +
<code>00000000: f5 3c XY a9    c_unk1 $cY $cX</code> - unknown crypto operation.
    
<code>00000000: f5 3c 0X 90    crng $cX</code> - seems to initialize a crypto register with random data.
 
<code>00000000: f5 3c 0X 90    crng $cX</code> - seems to initialize a crypto register with random data.