An update of QuackCryption v1.1.0. The changes are as follows:
- File quackcryption/dequackcryption is now dramatically faster
This release is fully backwards compatible with v1.1.0.
QuackCryption is a novel approach to data structures, app development, and encryption by four, 2nd-semester Purdue University computer science majors. In essence, either text or a file is inputted (along with maybe a passphrase of the user's choosing), the text is encrypted using 128-bit AES (in CBC mode), and then that text is then converted into 'Quack' code. The data encrypted can be decrypted back to its original form, bit-for-bit. This software is open source.
See here for the website.
QuackCryption.java
— The source code file for QuackCryption.Quacks.csv
— The table for how the byte-level data is represented.test.png
andencrypted.quack
— An example of QuackCryption's file encryption.
- All keys and initial vectors (called
initVector
in the code) must be 16 characters long. String throughQuack(String key, String initVector, String normalText)
— Takes in the key, inital vector, and the text you want to encrypt. It then outputs the final quacked text.String throughNormal(String key, String initVector, String quackedText)
— Same as above, but in reverse.int fileThroughQuack(String key, String initVector, String fileName)
— Takes in a file (via thefileName
string) and outputs a file namedencrypted.quack
. That represents the original file using quacks. Returns 0 if an error occurs. Returns 1 if it suceeds.int fileThroughNormal(String key, String initVector, String fileName)
— Same as above, but in reverse.String toAES(String key, String initVector, String normalText)
— Takes in the key, initial vector, and the text to be encrypted (using AES). It then outputs a string encrypted using AES.String fromAES(String key, String initVector, String encryptedText)
— Same as above, but in reverse.String toQuack(String normalText)
— Takes in a string and outputs its quacked equivalent. Essentially just theQuacks.csv
table in code.String fromQuack(String quackedText)
— Same as above, but in reverse.
Inputted strings are first encrypted using 128-bit AES (CBC with PKCS5 padding). Then, each character in the outputted string (that's already been encrypted with AES) is replaced with a 'quackquack' (where each character can be either upper case or lower case). As a result of AES encryption, the encrypted string only contains ASCII table characters. Therefore, only 128 varying capitalizations of 'quackquack' are needed. The reason 'quackquack' is used rather than 'quack' is because a single 'quack' only has 2^5 (32) possibliites, which is insufficient to cover the ASCII table.
Each quacked file consists of two parts: the header and the actual file's contents. The header starts with quackquAck
and ends with QuackquAck
. Everything in between represents the original file's name. The file name is encrypted separately from the body. Everything after the quackquack
signaling the end of the header represents the body.
Files are just binary data (which can be represented using integers) in a container. Each byte is read in one at a time, converted into an integer, and stored into a string with a space separating each integer. That data is then encrypted using QuackCryption in the same manner as strings. Each quackquack
in the body represents a character in the AES-encrypted string.
MIT License.