03 - Create a new CrypTool 2 Component (CrypTool 2 Development Series) @CryptographyForEverybody
03 - Create a new CrypTool 2 Component (CrypTool 2 Development Series)  @CryptographyForEverybody
Uploaded October 2019 | Updated November 2026, 2 days ago
#cryptology, #cryptography, #cryptanalysis

In this video, we show how to develop a new CrypTool 2 component from the scratch. You need: Visual Studio 2019 Community Edition, the CrypTool 2 component template for Visual Studio, and the CrypTool 2 source code. How to get all of these, please have a look at video 1 of this series (youtube.com/watch?v=YaSd_4t19nk&list=PLMuvAbyIl0PTTfPE2VhJ9PZ6qlOG0MMaX) if not already done.


-------------------------

Hint: (update 01 oct 2020):
There is a problem when using the standard modulo operator of .net/C#. It may return negative numbers, which the math. operator does not. Therefore, we have to "fix" it using a method implementing the math. operator. So replace % in your code by the following method call:


private int Mod(int a, int b)
{
if(a GREATER_OR_EQUAL 0) // youtube does not allow the greater parenthesis symbol here;
{ return a % b; }
else
{ return ((a % b) + b) % b; }
}

-------------------------


Check list:
-------------------------
Step 1: Create new plugin project (using the plugin template in Visual Studio 2019)
Step 2: Rename plugin class file and rename settings class file
Step 3: Adapt plugin class attributes
Step 4: Create input properties (A, B, Input) and an output property (Output)
Step 5: Adapt and rename settings class : We need a way to switch between encryption and decryption action
Step 6: Implement Execution() method in plugin class (and needed helper methods)
Step 7: Compile and then test everything in CrypTool 2

Affine cipher definitions:
-------------------------
Encryption: C = (A * P + B) mod M
Decryption: P = (A^-1 * (C - B)) mod M

where
C is a ciphertext symbol as integer,
P is a plaintext symbol as integer,
M is the modulus,
A and B are integers (keys of the cipher),
A^-1 is the modular multiplicative inverse of A modulo M

In our case M = 26 since our alphabet is the Latin alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZ" which has length 26

Like what I do ๐Ÿ˜„? Help fuel my crypto obsession ๐ŸŽ“ โ€” buy me a coffee hereโ˜•โ€” thx: buymeacoffee.com/cryptographyforeverybody
03 - Create a new CrypTool 2 Component (CrypTool 2 Development Series)The Trithemius Cipher and the Tabula Recta โ€“ Lets Create and Break Them01 - Installation of TortoiseSVN, VS2019, and Plugin Template (CrypTool 2 Development Series)Let DALLยทE Paint Some Cryptography โ€“  What Does it Know About Cryptography?09 -  Create a Unit Test for the Component (CrypTool 2 Development Series)Basics of Cryptology โ€“ Part 7 (Modern Cryptography โ€“ Perfect Ciphers and One-Time Pad)End-to-End Encryption Explained โ€“ This is How Every Messenger Should Encrypt DataStatus of CrypTool 2 - Talk held by Nils Kopal during the CrypTool 20+ years meetingDecipher Secret Messages in the Videogame StrayBlockchain Explained โ€“ The Basics of Bitcoin โ€“ How Blocks, Mining, and Transactions WorkBeaufort Cipher Explained and BrokenCrypto Challenge Contest โ€“ Video 4
Cryptography for Everybody |

03 - Create a new CrypTool 2 Component (CrypTool 2 Development Series)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER