Dynamic Shuffled Keyboard Stream Cipher for Encryption
- Author:
Andrew R. Garcia
- Contact:
Abstract
The algorithm presented in this paper, STREAMDICE, is a novel stream cipher that provides encryption by considering the specific identity of characters and their relative location in the message string. STREAMDICE utilizes dynamically shuffled keyboards, generated by a cryptographically secure pseudo-random number generator (CSPRNG), with each keyboard shifted for every encrypted character. These shuffled keyboards are stored in memory using securely derived seeds, dependent on the provided encryption keys. This approach optimizes auxiliary space complexity while enhancing resistance to brute force attacks. The decryption process reverses the encryption protocol using the same keys.
Introduction
Effective encryption is crucial for protecting data and private information. Proper encryption ensures that unauthorized access to data is meaningless without the correct encryption keys. The algorithm presented here, STREAMDICE, is a stream cipher that encrypts characters (i.e., letters, numbers, and some allowed signs) by their specific identity and their relative location in the message string thread. STREAMDICE uses dynamically shuffled keyboards generated by a cryptographically secure pseudo-random number generator (CSPRNG), with each keyboard shifted for every encrypted character. This method obfuscates periodicity and enhances resistance to brute force attacks, making it a robust encryption solution.
Method
Unwarped Map Creation
The unwarped map represents the original arrangement of characters on a QWERTY keyboard, including uppercase and lowercase letters, numbers, and special characters. Let \(\mathbb{C}\) be the character set used for encryption. The bidirectional map, \(p_U\), associates each character \(\mathcal{C}_i \in \mathbb{C}\) with its corresponding index \(i\):
Standard QWERTY keyboard
Map Warping
The map warping operation \(p_W\) is initialized with a \(\text{CSPRNG}(\mu_i)\) seeding, where \(\mu_i\) is a seed generated by the encryption key provided by the user. This operation reshuffles the keys, adding a layer of randomness to the encryption process. Every map warping operation produces a unique keyboard set.
Randomly-shuffled keyboard with ( mu_i ) seed #5443
Character Encryption and Decryption Process
The encryption process transforms input characters \(\mathcal{S}_i\) into their corresponding encrypted characters \(\mathcal{C}_i\) using \(p_W\) map warping. Decryption reverses this process using \(p_U\) map unwarping. For each character \(\mathcal{S}_i\) in a message string \(\mathbb{S}\), the algorithm retrieves the corresponding index using \(p_U(\mathcal{S}_i)\) and applies \(p_W\) to obtain \(\mathcal{C}_i\). If \(\mathcal{S}_i\) is a space, it is directly printed.
Security Analysis
STREAMDICE leverages cryptographically secure PRNGs and strong key derivation functions to generate seeds, ensuring robustness against brute force and cryptographic attacks. The dynamic shuffling of keyboards for each character encryption introduces high entropy, obfuscating periodicity and enhancing security.
Conclusion
STREAMDICE introduces a novel approach to stream ciphers by employing dynamically shuffled keyboards and secure seed management. This method optimizes memory usage while providing robust security against brute force attacks. Future work will focus on formal security proofs and performance optimizations.