XOR operation now supports both input and output differentials. Fixes #17

This commit is contained in:
n1474335 2016-12-03 01:42:23 +00:00
parent fc9d0a63c2
commit 20d9903572
7 changed files with 47 additions and 39 deletions

View file

@ -209,7 +209,7 @@ var OperationConfig = {
]
},
"XOR": {
description: "XOR the input with the given key.<br>e.g. <code>fe023da5</code><br><br><strong>Options</strong><br><u>Null preserving:</u> If the current byte is 0x00 or the same as the key, skip it.<br><br><u>Differential:</u> Set the key to the value of the previously decoded byte.",
description: "XOR the input with the given key.<br>e.g. <code>fe023da5</code><br><br><strong>Options</strong><br><u>Null preserving:</u> If the current byte is 0x00 or the same as the key, skip it.<br><br><u>Scheme:</u><ul><li>Standard - key is unchanged after each round</li><li>Input differential - key is set to the value of the previous unprocessed byte</li><li>Output differential - key is set to the value of the previous processed byte</li></ul>",
run: BitwiseOp.run_xor,
highlight: true,
highlight_reverse: true,
@ -222,15 +222,15 @@ var OperationConfig = {
value: "",
toggle_values: BitwiseOp.KEY_FORMAT
},
{
name: "Scheme",
type: "option",
value: BitwiseOp.XOR_SCHEME
},
{
name: "Null preserving",
type: "boolean",
value: BitwiseOp.XOR_PRESERVE_NULLS
},
{
name: "Differential",
type: "boolean",
value: BitwiseOp.XOR_DIFFERENTIAL
}
]
},