Here are a selection of projects that I have worked on over the last two years.
This project is a console application implementing a secure messenger based on the Signal app algorithm. The aim was to program end-to-end encryption through sockets for both the server and clients. Each client connects to the server, generates its certificate, and sends it to the server for storage. The clients use the Double Ratchet algorithm to generate root keys, encrypt their messages with AES-GCM, and use the Diffie-Hellman protocol to exchange keys, ensuring that only the clients share the secret key to decrypt the messages. The server acts solely as an intermediary and stores the certificates. Each client is managed by a client handler. Here is an example of a client interface. The command line is written after the Messenger.Server is running. > java Messenger.Client Logging to Messenger ... ___ ___ | Version : 1.0.0 | \/ | | Coding : Java | \ / | ___ ___ ___ ___ _ __ __ _ ___ _ __ | Creators : DEPARTOUT-Pignard Gabriel | |\/| |/ _ \/ __/ __|/ _ \ '_ \ / _` |/ _ \ '__| | LOEZIC Antonin | | | | __/\__ \__ \ __/ | | | (_| | __/ | | ROUSSEAU Jules |__| |__|\___||___/___/\___|_| |_|\__, |\___|_| | __/ | | Enjoy using this secured chat ! |___/ | Enter "help" after signing for help Enter your username: Alice -> You are connected as Alice Update : The connected users are: -Bob Bob Your certificate has been sent to the recipient, awaiting a response from them -> Certificate from Bob verified -> You can now talk to Bob User Bob accept your certificate !Let's send your first message to your new friend Bob Bob : Hey, Alice there ! >>> Bob : Hey, I received your message! help -> Help section of the Messenger application. +-------------------------------+ | Special commands | +-------------------------------+ [exit] | [quit] : Close the chat and exit the Application [help] : Display this help [who] : Display the list of users you can have a conversation with +-------------------------------+ | Connection to other users | +-------------------------------+ If you want to establish a connection with a user in the list of available users you received, you must send the user your signed certificate. To do so, just enter their username "@userName" in the chat. You should receive a message telling you you can now talk to each other. Once it's done, you MUST SEND THE FIRST MESSAGE to initiate conversation. +-------------------------------+ | Sending a message to a user | +-------------------------------+ After connection is established with another user (see in section above to see how to do it), you can send the user a message. To do so, you have to wright the other user name followed by ":" and then your message as shown on the example bellow. Example : let the connection with Alice be established. >> Alice : Hello ! (or Alice:Hello !) who The connected users are: -Bob (friend) -Alice (you)
Here’s a slightly different project I did in my spare time. I integrated some html scripts into a Genialy slideshow to create a little escape game. Of course, the subject is cybersecurity but it’s designed so that anyone can do it.
AES (Advanced Encryption Standard) As part of my cryptography project, I developed a complete implementation of the AES in the C programming language following the FIPS 197 standard. This project includes the creation of a program capable of encrypting and decrypting files using both ECB and CBC modes. My program runs from a terminal and supports several options, such as selecting the encryption key, choosing the encryption mode (ECB by default, CBC optional), and displaying the results in hexadecimal format. An integrated user manual allows users to view the available commands. For the AES implementation, I used tables generated via SageMath for the S-boxes and polynomial-exponentiation transformations. I also developed specific procedures to handle conversions as for instance : hexadecimal (within a string) to int. DSA (Digital Signature Algorithm) In my project on implementing the DSA as specified by the FIPS 186-3 standard, I focused on leveraging existing functions from the BigInteger module (multiprecision library) to streamline the development process. Indeed, BigInteger provides operations for modular arithmetic, GCD calculation, primality testing, prime generation, and bit manipulation on large integers needed for the signature. The signature needs a hash function, thus I used the SHA-1 hash function. This project was a holiday assignment to prepare for my Master’s 2 studies and to gain some experience with Java. I learned how to handle classes to manage private and public keys (x, y) and the signature parameters (r, s). This setup facilitates the generation of new key pairs and signatures using the “new” command and allows for updates as needed. Midori-64 Midori-64 is actually a cryptographic algorithm, specifically a lightweight block cipher. This cipher encrypts 64-bit blocks using a 128-bit key. The algorithm performs 16 rounds of encryption, where each round involves several key components: SubCells for nonlinear substitution (adding confusion), MixColumn for linear transformation (ensuring diffusion), ShiftRows for rearranging bits across rows, and AddRoundKey, which applies a XOR with a round key to the data. My Python implementation of Midori-64 is a simplified version of the standard. Specifically, some round constants are omitted. The primary objective was to conduct differential cryptanalysis on this cipher as part of a Symmetric Cryptanalysis course. Omitting the additional constants made it easier to understand and identify differential trails.
The goal of this project was to generate random Sudoku grids of sizes from 1x1 to 64x64 and to solve them using heuristics to complete this task in the minimum amount of time. As some generated grids may allow multiple solutions and require making choices to continue the resolution, I used backtracking to deal with choices leading to inconsistent solved grids. Backtracking was also used in order to generate grid with a unique solution. The generation consists in first filling randomly a grid to a solved grid, then blanking some cells randomly and try to solve the grid. If the grid has more than one solution while the unique option is specified, the cell is reset to its solved value and another random cell is blanked among the remaining ones. If the process take too much time, another full grid is generated and we blank random cells again. Below is an example of utilisation of the program. > ./sudoku --generate=25 --unique --output grid_25.txt ***** Generating grid of size 25 ... The grid has been generated ! Initial fill ratio: 60% This grid has a unique solution > ./sudoku grid_25.txt --verbose --all ------ SUDOKU grid (size 25) ------ 2 F M 6 H P _ G D J _ E 8 4 L N _ _ 9 _ _ _ B 7 _ _ _ J _ D _ _ N _ _ _ 1 I 5 3 _ B E _ H 9 6 _ 2 F _ I G _ _ _ 5 E _ _ _ _ _ 9 _ 4 _ C 2 _ N D J _ H _ 3 E 5 K _ _ 9 _ 4 _ B 7 G _ J D _ P _ _ M _ _ C B A 9 _ _ F 3 C _ 2 D _ H P _ _ K M L 7 _ 5 O _ 8 _ 2 _ _ I _ 4 _ _ D H P E 8 6 _ 5 _ F M _ C _ N A N _ 8 M B _ 6 F _ _ I 4 D _ A O L 2 1 3 J E G 5 _ 1 H A _ _ _ 8 J _ I 5 M 3 L C _ _ _ G B 7 F K 6 _ _ _ 6 J O E _ 3 9 M 1 F G B K 8 _ _ D _ 2 L I _ P E _ _ 3 F _ L 1 _ P 9 _ 2 _ N _ H _ I _ _ 8 D B 4 3 _ _ A G N _ _ 1 _ _ D _ K M L J O E _ _ I C F _ _ O _ _ 6 K _ _ G _ L 8 _ E _ _ N _ _ 4 D P _ M 1 _ N _ _ _ B 2 5 _ E 3 G _ _ _ _ 9 D 6 _ O _ 7 _ _ 5 1 _ L _ H D O F 6 7 9 J _ _ M P 8 _ C B _ _ _ _ _ 7 K _ _ _ P _ _ L _ _ 1 O _ _ F A B _ _ _ 8 E _ 6 8 _ G 2 5 _ A B 9 P _ K 3 1 F M I N L _ O _ C _ A B 4 H _ D _ _ 8 F _ _ _ _ _ 6 O G J _ 3 9 _ _ M C K N _ _ I O L 6 H 8 A M F _ D 1 _ 4 2 G _ P _ 7 9 J _ _ _ M N 4 K 3 O L _ _ _ 5 _ B C _ I _ 2 8 D O M 7 _ 3 J G _ _ 1 B _ _ _ _ A _ 9 H _ _ K 6 L _ _ _ _ _ 4 _ E H _ _ K _ 9 I _ 7 6 _ _ _ _ _ _ A _ _ _ 3 F _ 1 _ D L _ _ 2 _ _ 8 _ A 4 _ _ C 7 _ 9 J H D _ _ J 9 _ K _ O A 3 P M _ _ G _ 8 _ _ _ L 4 B _ 6 _ 2 A _ M _ _ C _ H _ D F B E K _ 9 _ N _ O G _ 9 _ _ 8 A _ _ 3 _ 4 C O 1 7 P _ L 5 J K _ _ D I ***** Solving grid from 'grid_25.txt' ... Solution 1: 2 F M 6 H P 1 G D J C E 8 4 L N I 5 9 O A 3 B 7 K P C J O D L K N 7 8 M 1 I 5 3 G B E A H 9 6 4 2 F L I G 1 7 6 5 E M B F K A 9 O 4 3 C 2 8 N D J P H 8 3 E 5 K O H 9 A 4 N B 7 G 2 J D F P 6 L M 1 I C B A 9 4 N F 3 C I 2 D 6 H P J 1 K M L 7 E 5 O G 8 7 2 L K I G 4 B O D H P E 8 6 9 5 J F M 1 C 3 N A N P 8 M B C 6 F H K I 4 D 7 A O L 2 1 3 J E G 5 9 1 H A D 9 2 8 J N I 5 M 3 L C E 4 P G B 7 F K 6 O 4 5 6 J O E A 3 9 M 1 F G B K 8 C 7 D N 2 L I H P E G C 3 F 7 L 1 5 P 9 O 2 J N K H 6 I A M 8 D B 4 3 4 P A G N 9 8 1 7 2 D B K M L J O E 5 H I C F 6 F O 2 B 6 K J I G A L 8 C E 5 3 N H 7 4 D P 9 M 1 J N H 8 M B 2 5 C E 3 G F A P I 9 D 6 1 O 4 7 K L 5 1 I L E H D O F 6 7 9 J N 4 M P 8 K C B G A 3 2 D 7 K 9 C 3 P M 4 L 6 I 1 O H 2 F A B G 5 J 8 E N 6 8 D G 2 5 7 A B 9 P J K 3 1 F M I N L 4 O H C E A B 4 H L D C P 8 F E 7 5 2 I 6 O G J K 3 9 N 1 M C K N E 5 I O L 6 H 8 A M F 9 D 1 3 4 2 G B P J 7 9 J F P 1 M N 4 K 3 O L 6 H G 5 7 B C E I A 2 8 D O M 7 I 3 J G 2 E 1 B N 4 C D A 8 9 H P F K 6 L 5 G L O C 4 8 E H J N K 5 9 I B 7 6 1 M D P 2 F A 3 K E 3 F P 1 B D L 5 G 2 N 6 8 H A 4 O I C 7 M 9 J H D 5 7 J 9 I K 2 O A 3 P M E C G N 8 F 6 1 L 4 B I 6 1 2 A 4 M 7 P C J H L D F B E K 3 9 8 N 5 O G M 9 B N 8 A F 6 3 G 4 C O 1 7 P 2 L 5 J K H E D I The grid is solved ! Statistics of the current run: * Initial fill ratio: 60% * Number of choices: 0 * Number of solutions: 1
As part of a Master I cryptography project, I implemented a software program that performs steganography and steganalysis. The software allows hiding grayscale images and text messages in a so-called grayscale stego image. Various methods can be used: Hiding the information in the Least Significant Bits (LSB) plane of the image (default behavior). Hiding secret data in a chosen bit plane among the 8 possible ones. Choosing the pixels randomly, with a seed as a key to recover the secret data. Encoding sequentially the secret over the pixels of the stego image (default behavior). The software can also decrypt the message/image hidden in a stego image by knowing the length of the secret. Steganalysis In this project, it is possible to perform steganalysis by extracting the bit planes of a grayscale image to visually examine if secret data is embedded. For example, we can see on the LSB plan below that secret information is embedded in the upper part of the image. It also allows comparing two different image planes by displaying their difference. Thus, it’s possible to see clearly where the secret is embedded, as we know the before and after stego images. Bit plan extraction of a stego image LSB plan Intermediate plan MSB plan Stego image (96x64 pixels)