diff --git a/src/core/lib/BitwiseOp.mjs b/src/core/lib/BitwiseOp.mjs index fe33c812..516a816b 100644 --- a/src/core/lib/BitwiseOp.mjs +++ b/src/core/lib/BitwiseOp.mjs @@ -34,10 +34,10 @@ export function bitOp (input, key, func, nullPreserving, scheme) { !(nullPreserving && (o === 0 || o === k))) { switch (scheme) { case "Input differential": - key[i % key.length] = x; + key[i % key.length] = o; break; case "Output differential": - key[i % key.length] = o; + key[i % key.length] = x; break; } }