Abstract
When the Source of Keying Material (SKM) for a Key Derivation Function (KDF) contains entropy but is non-uniformly distributed or non-pseudorandom, a fixed-length pseudorandom key (PRK) must first be generated using a randomness extractor (XTR) before being expanded into a variable-length key. This paper proposes PC-KCTR-HMAC, a KDF based on Convolutional Neural Networks (CNNs). First, the PC module efficiently generates high-entropy pseudorandom sequences that pass all 15 NIST SP 800 − 22 tests. Second, a counter-based HMAC mode is employed to extract and derive variable-length keys. Experimental results demonstrate that the security of the proposed scheme satisfies the requirements of a variable-output-length Pseudorandom Function (volPRF). Compared to existing methods, PC-KCTR-HMAC significantly enhances key randomness and security while maintaining high efficiency.
Introduction
In modern cryptography, the strength of an encryption system is fundamentally tied to the quality of its keys. A Key Derivation Function (KDF) serves as the critical link between raw Source Keying Material (SKM)—which often lacks uniformity—and the cryptographically robust keys required for secure communication. Traditional SKM generation methods, such as Linear Congruential Generators, are increasingly vulnerable to sophisticated attacks. Furthermore, many existing KDFs struggle with efficiency when generating variable-length keys or are susceptible to collision attacks.
PC-KCTR-HMAC addresses these challenges by leveraging the inherent instability and high sensitivity of deep neural networks to transform images into high-entropy cryptographic seeds.
The PC-KCTR-HMAC Architecture
The proposed system follows a two-stage "Extract-then-Expand" paradigm, integrated with a novel entropy generation module.
1. The PC Module (Pseudorandom CNN)
The core of the entropy generation is the PC module, which utilizes a pre-trained VGG16 network. By removing the final fully connected layers, the authors exploit the high-dimensional feature extraction capabilities of the convolutional base.
The process involves:
- Input & Noising: An image from the ImageNet dataset is used as input. Noise is added to ensure that even identical images can produce distinct outputs.
- Feature Extraction: The VGG16 network processes the image into a $7 \times 7 \times 512$ feature tensor.
- Binarization & XOR: This tensor is flattened and converted into a bitstream. The extreme sensitivity of CNNs ensures that a single-bit change in the input image propagates into a completely different output bitstream, providing the necessary "avalanche effect" for cryptographic security.
2. The KCTR-HMAC Module
Once the raw SKM is generated, it must be refined:
- Extraction (XTR): HMAC-SHA256 is used to "smooth" the non-uniform SKM into a fixed-length Pseudorandom Key (PRK).
- Expansion (PRF): A counter-based HMAC (CTR mode) expands the PRK into the final Key Material (KM) of the required length. This design allows for significant parallelism, enhancing performance on modern hardware.
Experimental Results and Security Analysis
The authors validated PC-KCTR-HMAC using the NIST SP 800-22 statistical test suite, the industry standard for cryptographic randomness.
- Randomness: The generated sequences passed all 15 NIST tests with P-values significantly above the 0.01 threshold, indicating near-perfect randomness.
- Efficiency: Benchmarks show that PC-KCTR-HMAC is highly efficient. For a 1Kbit key, it achieved a derivation time of 13.02µs, outperforming block-cipher-based alternatives like KCTR-KMAC (30.69µs).
- Provable Security: The construction is mathematically proven to function as a secure variable-output-length Pseudorandom Function (volPRF), with derived upper bounds for collision and preimage resistance.
Conclusion
PC-KCTR-HMAC represents a significant step forward in bridging deep learning and classical cryptography. By exploiting the "instability" of CNN features, the system generates high-quality entropy that is both fast and secure. Future work may explore post-quantum optimizations using Keccak-based KMAC or the application of different architectures like Transformers to further enhance randomness properties.
Summary updated