The F5 algorithm proposed by Westfeld is still one of the most known algorithms in the field of DCT-based steganography. It can make a JPEG image a container of a secret message, where no one knows the presence of the message except the sender and the intended receiver. In this programming work, we show how to realize the F5 algorithm via Matlab. We present the block diagrams of embedding and extracting processes and the entire Matlab code of the F5 algorithm.
Some Notes about the F5 Matlab code:
1- The implementation code works according to the method proposed by Andreas Westfield in his paper:
" F5—A Steganographic Algorithm : High Capacity Despite Better Steganalysis ".
Huffman coding and decoding are implemented using the Matlab JPEG Toolbox developed by Phil Sallee.
2- The two-part Matlab code included in the report, embedding and extracting parts, can be executed in Matlab IDE. The embedding part reads the cover JPEG file and the message file we want to hide, then it creates a Stego JPEG file according to the F5 algorithm. On the other side, The extracting part reads the Stego JPEG file, and then it extracts the hidden message file.
3- The F5 code calls the main two functions of Phil Sallee's Matlab Toolbox; JPEG reading and writing. These functions make it easier to access and manipulate the quantized DCT coefficients of a given JPEG file. Using Sallee's Toolbox should accord with the used operating system, whether it is 32 or 64 bits.
4- The F5 code contains the function to form the image matrix to show the input and output images. Running this function requires ALL the Sallee's Toolbox to be installed. Otherwise, the user can REMOVE this function from the code since it doesn't affect the main F5 process and thus keep ONLY using the main two function of the Sallee's Toolbox.
5- The message file we want to hide can be any file of any kind and whatever its extension. The size of the message file should be appropriate for the size of the used cover JPEG image, so no errors will occur when executed.
Inhaltsverzeichnis (Table of Contents)
- Introduction to JPEG-based Steganography
- F5 Steganographic Method
- Matlab Implementation of F5 Algorithm
- Huffman Coding and Decoding
- Implementation of F5 Embedding Process
- Steps of F5 Embedding Process
- Main Script and Called Functions
- Matlab Codes of F5 Embedding Process
- F5Embed Matlab Main Script
- Msgsize Matlab Function
- Qdct2Img Matlab Function
- MediCap Matlab Function
- MatEncod Matlab Function
- GetkBits Matlab Function
- DoEmbed Matlab Function
- DoStego Matlab Function
- F5Hash Matlab Function
- DoChange Matlab Function
- HistPlot Matlab Function
- Implementation of F5 Extracting Process
- Steps of F5 Extracting Process
- Main Script and Called Functions
- Matlab Codes of F5 Extracting Process
- F5Extract Matlab Main Script
- MediCap Matlab Function
- DoExtract Matlab Function
- F5Hash Matlab Function
- Programming Notes
- References
Zielsetzung und Themenschwerpunkte (Objectives and Key Themes)
This programming work aims to demonstrate how to implement the F5 steganographic algorithm using MATLAB. It presents the block diagrams of the embedding and extracting processes, along with the complete MATLAB codes for the F5 algorithm.
- JPEG-based Steganography
- F5 Steganographic Algorithm
- MATLAB Implementation
- DCT-based steganography
- Huffman Coding and Decoding
Zusammenfassung der Kapitel (Chapter Summaries)
- Chapter 1: This chapter introduces the concept of JPEG-based steganography, highlighting its role in information protection and comparing it with cryptography. It discusses the advantages of using JPEG images as containers for secret messages, emphasizing the importance of DCT-based steganographic methods, including the F5 algorithm.
- Chapter 2: This chapter delves into the F5 steganographic method, which utilizes a hash function to embed a secret message within a JPEG image. It explains the principle of matrix encoding and the role of dmax, n, and k parameters. The F5 algorithm focuses on minimizing modifications to the DCT coefficients while ensuring message embedding.
- Chapter 3: This chapter presents the MATLAB implementation of the F5 algorithm. It discusses the use of a dedicated MATLAB JPEG Toolbox for accessing and manipulating the DCT coefficients of JPEG images. The chapter then provides details about the implementation of the F5 embedding and extracting processes, including the steps involved, main scripts, called functions, and specific MATLAB code snippets for each function.
- Chapter 4: This chapter offers programming notes, possibly related to considerations, challenges, or best practices encountered during the MATLAB implementation of the F5 algorithm. It may provide insights into specific coding techniques, optimizations, or limitations.
Schlüsselwörter (Keywords)
This work focuses on the key concepts of steganography, specifically JPEG-based steganography and the F5 algorithm. It examines the implementation of the F5 algorithm using MATLAB, encompassing DCT-based methods, Huffman coding and decoding, and the use of a dedicated JPEG Toolbox. The key themes explored include embedding and extracting secret messages, optimizing changes to DCT coefficients, and achieving secure communication through hidden channels.
- Quote paper
- Wassim Al Chamaa (Author), 2018, MATLAB Implementation of the Steganographic Algorithm F5, Munich, GRIN Verlag, https://www.grin.com/document/464340