September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -19,12 +19,12 @@ VAR
|
|||
(* TASK globals *)
|
||||
Msg: TString = 'a Top Secret secret';
|
||||
Key: TString = 'this is my secret key';
|
||||
XCTxt: TString = ''; (* XOR ciphertext *)
|
||||
MCTxt: TString = ''; (* MOD ciphertext *)
|
||||
XPTxt: TString = ''; (* XOR decryption (plaintext) *)
|
||||
MPTxt: TString = ''; (* MOD decryption (plaintext) *)
|
||||
XorCipherText: TString = '';
|
||||
ModCipherText: TString = '';
|
||||
XorPlainText: TString = '';
|
||||
ModPlainText: TString = '';
|
||||
Mode: TMode = iEncrypt;
|
||||
HexTxt: TString;
|
||||
HexText: TString;
|
||||
|
||||
(* ISAAC globals *)
|
||||
(* external results *)
|
||||
|
|
@ -228,23 +228,23 @@ BEGIN
|
|||
(* (2) Encryption *)
|
||||
Mode := iEncrypt;
|
||||
(* (a) XOR (Vernam) *)
|
||||
Vernam(Msg, XCTxt);
|
||||
Vernam(Msg, XorCipherText);
|
||||
(* (b) MOD (Vigenere) *)
|
||||
Vigenere(Msg, Mode, MCTxt);
|
||||
Vigenere(Msg, Mode, ModCipherText);
|
||||
(* (3) Decryption *)
|
||||
Mode := iDecrypt;
|
||||
SeedIsaac(Key, TRUE);
|
||||
(* (a) XOR (Vernam) *)
|
||||
Vernam(XCTxt, XPTxt);
|
||||
Vernam(XorCipherText, XorPlainText);
|
||||
(* (b) MOD (Vigenere) *)
|
||||
Vigenere(MCTxt, Mode, MPTxt);
|
||||
Vigenere(ModCipherText, Mode, ModPlainText);
|
||||
(* program output *)
|
||||
WriteString('Message: '); WriteString(Msg); WriteLn;
|
||||
WriteString('Key : '); WriteString(Key); WriteLn;
|
||||
ASCII2Hex(XCTxt, HexTxt);
|
||||
WriteString('XOR : '); WriteString(HexTxt); WriteLn;
|
||||
ASCII2Hex(MCTxt, HexTxt);
|
||||
WriteString('MOD : '); WriteString(HexTxt); WriteLn;
|
||||
WriteString('XOR dcr: '); WriteString(XPTxt); WriteLn;
|
||||
WriteString('MOD dcr: '); WriteString(MPTxt); WriteLn;
|
||||
ASCII2Hex(XorCipherText, HexText);
|
||||
WriteString('XOR : '); WriteString(HexText); WriteLn;
|
||||
ASCII2Hex(ModCipherText, HexText);
|
||||
WriteString('MOD : '); WriteString(HexText); WriteLn;
|
||||
WriteString('XOR dcr: '); WriteString(XorPlainText); WriteLn;
|
||||
WriteString('MOD dcr: '); WriteString(ModPlainText); WriteLn;
|
||||
END RosettaIsaac.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue