Abstract
As deepfake technology continues to advance at a rapid pace, there is a constant need to develop new methods to counteract its use. Physical copies of authentic items like signed baseball memorabilia use a certification to identify the authenticity. This paper proposes using steganography to embed a signed watermark inside a digital image. By using RSA to generate, sign, and verify the watermark, individuals will be able to authenticate personal images or try to verify signed images for authenticity. We evaluate the proposed approach with images manipulated by deepfake algorithms. The experiment results show 100% detection rate on deepfake images. The signing time and the verification time are around 300 ms according to our experiments. So the overhead of the countermeasure are negligible.
Introduction
Deepfake technology has transitioned from a niche academic pursuit to a widely accessible tool capable of generating highly convincing synthetic media. While much of the current research focuses on "reactive" detection—using AI to identify subtle artifacts or "fingerprints" left by Generative Adversarial Networks (GANs)—this approach is inherently limited. As generative models improve, these artifacts disappear, leading to a perpetual arms race between creators and detectors.
This paper proposes a "proactive" countermeasure. By borrowing the concept of a certificate of authenticity from the physical world, we can "sign" digital images at the source. If an image is later manipulated by a deepfake algorithm, the hidden signature is destroyed, rendering the image unverifiable.
The Deepfake Mechanism
To understand how to defend against deepfakes, one must understand how they are created. Most face-swapping algorithms rely on an encoder-decoder architecture. During training, an encoder learns to compress faces into a latent representation, while decoders learn to reconstruct specific faces from that representation.
In the "Converting" phase, the encoder processes Face A, but the latent representation is passed to Decoder B. This results in a generated image that has the pose and expression of Person A but the features of Person B. Because this process involves a complete reconstruction of pixels in the facial region, any pre-existing data hidden within those pixels is overwritten.
Methodology: Proactive Authentication
The proposed system integrates three core technologies to create a robust digital signature:
- Facial Detection: The system first identifies the bounding box of the face. This ensures the watermark is placed exactly where deepfake algorithms perform their pixel-level reconstructions.
- RSA Cryptography: We utilize the Rivest-Shamir-Adleman (RSA) algorithm. A private key is used to sign a watermark, creating a unique digital signature. This ensures that only the authorized creator can generate a valid signature, while anyone with the corresponding public key can verify it.
- LSB Steganography: The signature is embedded using Least Significant Bit (LSB) replacement. By modifying only the 8th bit of the bytes representing facial pixels, the signature remains invisible to the human eye, preserving the image's visual fidelity.
Implementation and Results
The system was implemented in two modules: Sign.py and Verify.py. During verification, the software re-runs facial detection, extracts the LSB data from the facial region, and attempts to decrypt it using the public key.
In experimental trials using 30 base images and three distinct FaceSwap models, the system achieved a 100% detection rate. Every original signed image was verified as authentic, and every deepfaked image failed authentication. Furthermore, the computational overhead was found to be negligible, with signing and verification typically taking around 300ms.
Limitations and Future Work
While highly effective, the system faces challenges regarding "Facial Bound Shifting." Occasionally, the LSB manipulation itself can slightly alter the facial pixels, causing the facial detection algorithm to return a slightly different bounding box during verification. If the bounds shift even by a few pixels, the signature cannot be correctly extracted. Future work will focus on adding "start sequences" to signatures to improve retrieval robustness and extending the system to support video authentication.
Conclusion
By treating the face as an anchor for a fragile digital watermark, this proactive approach offers a reliable way to authenticate media. Unlike reactive AI detectors, this method provides a definitive "pass/fail" result based on cryptographic proof, making it a powerful tool in the fight against synthetic misinformation.
Summary updated