Merge pull request #316 from jfoug/master
[hashcat.git] / OpenCL / m07300_a3.cl
index 08459e7..e778cfd 100644 (file)
@@ -246,6 +246,10 @@ static void m07300m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_le
   const u32 gid = get_global_id (0);
   const u32 lid = get_local_id (0);
 
+  /**
+   * salt
+   */
+
   const u32 esalt_len = rakp_bufs[salt_pos].salt_len;
 
   /**
@@ -260,37 +264,31 @@ static void m07300m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_le
 
     const u32x w0lr = w0l | w0r;
 
-    /**
-     * pads
-     */
-
     u32x w0_t[4];
+    u32x w1_t[4];
+    u32x w2_t[4];
+    u32x w3_t[4];
 
     w0_t[0] = w0lr;
     w0_t[1] = w0[1];
     w0_t[2] = w0[2];
     w0_t[3] = w0[3];
-
-    u32x w1_t[4];
-
     w1_t[0] = w1[0];
     w1_t[1] = w1[1];
     w1_t[2] = w1[2];
     w1_t[3] = w1[3];
-
-    u32x w2_t[4];
-
     w2_t[0] = w2[0];
     w2_t[1] = w2[1];
     w2_t[2] = w2[2];
     w2_t[3] = w2[3];
-
-    u32x w3_t[4];
-
     w3_t[0] = w3[0];
     w3_t[1] = w3[1];
-    w3_t[2] = 0;
-    w3_t[3] = 0;
+    w3_t[2] = w3[2];
+    w3_t[3] = w3[3];
+
+    /**
+     * RAKP
+     */
 
     u32x ipad[5];
     u32x opad[5];
@@ -358,6 +356,10 @@ static void m07300s (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_le
   const u32 gid = get_global_id (0);
   const u32 lid = get_local_id (0);
 
+  /**
+   * salt
+   */
+
   const u32 esalt_len = rakp_bufs[salt_pos].salt_len;
 
   /**
@@ -384,37 +386,31 @@ static void m07300s (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_le
 
     const u32x w0lr = w0l | w0r;
 
-    /**
-     * pads
-     */
-
     u32x w0_t[4];
+    u32x w1_t[4];
+    u32x w2_t[4];
+    u32x w3_t[4];
 
     w0_t[0] = w0lr;
     w0_t[1] = w0[1];
     w0_t[2] = w0[2];
     w0_t[3] = w0[3];
-
-    u32x w1_t[4];
-
     w1_t[0] = w1[0];
     w1_t[1] = w1[1];
     w1_t[2] = w1[2];
     w1_t[3] = w1[3];
-
-    u32x w2_t[4];
-
     w2_t[0] = w2[0];
     w2_t[1] = w2[1];
     w2_t[2] = w2[2];
     w2_t[3] = w2[3];
-
-    u32x w3_t[4];
-
     w3_t[0] = w3[0];
     w3_t[1] = w3[1];
-    w3_t[2] = 0;
-    w3_t[3] = 0;
+    w3_t[2] = w3[2];
+    w3_t[3] = w3[3];
+
+    /**
+     * RAKP
+     */
 
     u32x ipad[5];
     u32x opad[5];