mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 15:56:16 -04:00
Added operation description note and modified comment formatting
This commit is contained in:
parent
3c68ad1302
commit
88947b9d42
3 changed files with 193 additions and 188 deletions
|
@ -1,28 +1,29 @@
|
|||
/**
|
||||
Emulation of the SIGABA machine.
|
||||
|
||||
@author hettysymes
|
||||
@copyright hettysymes 2020
|
||||
@license Apache-2.0
|
||||
*/
|
||||
* Emulation of the SIGABA machine.
|
||||
*
|
||||
* @author hettysymes
|
||||
* @copyright hettysymes 2020
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import Operation from "../Operation.mjs";
|
||||
import {LETTERS} from "../lib/Enigma.mjs";
|
||||
import {NUMBERS, CR_ROTORS, I_ROTORS, SigabaMachine, CRRotor, IRotor} from "../lib/SIGABA.mjs";
|
||||
|
||||
/**
|
||||
Sigaba operation
|
||||
*/
|
||||
* Sigaba operation
|
||||
*/
|
||||
class Sigaba extends Operation {
|
||||
|
||||
/**
|
||||
Sigaba constructor
|
||||
*/
|
||||
* Sigaba constructor
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.name = "SIGABA";
|
||||
this.module = "SIGABA";
|
||||
this.description = "Encipher/decipher with the WW2 SIGABA machine. <br><br>SIGABA, otherwise known as ECM Mark II, was used by the United States for message encryption during WW2 up to the 1950s. It was developed in the 1930s by the US Army and Navy, and has up to this day never been broken. Consisting of 15 rotors: 5 cipher rotors and 10 rotors (5 control rotors and 5 index rotors) controlling the stepping of the cipher rotors, the rotor stepping for SIGABA is much more complex than other rotor machines of its time, such as Enigma. All example rotor wirings are random example sets.<br><br>To configure rotor wirings, for the cipher and control rotors enter a string of letters which map from A to Z, and for the index rotors enter a sequence of numbers which map from 0 to 9. Note that encryption is not the same as decryption, so first choose the desired mode.";
|
||||
this.description = "Encipher/decipher with the WW2 SIGABA machine. <br><br>SIGABA, otherwise known as ECM Mark II, was used by the United States for message encryption during WW2 up to the 1950s. It was developed in the 1930s by the US Army and Navy, and has up to this day never been broken. Consisting of 15 rotors: 5 cipher rotors and 10 rotors (5 control rotors and 5 index rotors) controlling the stepping of the cipher rotors, the rotor stepping for SIGABA is much more complex than other rotor machines of its time, such as Enigma. All example rotor wirings are random example sets.<br><br>To configure rotor wirings, for the cipher and control rotors enter a string of letters which map from A to Z, and for the index rotors enter a sequence of numbers which map from 0 to 9. Note that encryption is not the same as decryption, so first choose the desired mode. <br><br> Note: Whilst this has been tested against other software emulators, it has not been tested against hardware.";
|
||||
this.infoURL = "https://en.wikipedia.org/wiki/SIGABA";
|
||||
this.inputType = "string";
|
||||
this.outputType = "string";
|
||||
|
@ -251,10 +252,10 @@ class Sigaba extends Operation {
|
|||
}
|
||||
|
||||
/**
|
||||
@param {string} input
|
||||
@param {Object[]} args
|
||||
@returns {string}
|
||||
*/
|
||||
* @param {string} input
|
||||
* @param {Object[]} args
|
||||
* @returns {string}
|
||||
*/
|
||||
run(input, args) {
|
||||
const sigabaSwitch = args[40];
|
||||
const cipherRotors = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue