// skip since adding 0u does nothing
v13 = ((v13 ^ v2).xy >> ROTATE_16) | ((v13 ^ v2).yx << ROTATE_16);
v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x));
- v7 = ((v7 ^ v8).xy << ROTATE_1) | ((v7 ^ v8).yx >> ROTATE_31);
+ // skip since we already have the final values of `v0` and `v8`
/**
* r=11, i=7, a=v[3], b=v[4], c=v[9], d=v[14]
*/
- v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x));
- // skip since adding 0u does nothing
- v14 = v14.yx ^ v3.yx;
- v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x));
- v4 = ((v4 ^ v9).xy >> ROTATE_24) | ((v4 ^ v9).yx << ROTATE_8);
- v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x));
- v3 = v3 + m3 + vec2(0u, u32(v3.x + m3.x < v3.x));
- v14 = ((v14 ^ v3).xy >> ROTATE_16) | ((v14 ^ v3).yx << ROTATE_16);
- v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x));
- v4 = ((v4 ^ v9).xy << ROTATE_1) | ((v4 ^ v9).yx >> ROTATE_31);
+ // skip entire step since we already have the final values of `v0` and `v8`
****************************************************************************/
/**
- * Set m0 if it passes the threshold and no other thread has set it
+ * Set nonce if it passes the threshold and no other thread has set it
*/
if ((BLAKE2B_IV32_1 ^ v0.y ^ v8.y) > threshold && atomicLoad(&work.found) == 0u) {
atomicStore(&work.found, 1u);