Unbreakable Encryption (?)
Class to encrypt and decrypt a clear text with variable character length encoding. There is no relationship between byte boundaries and encrypted characters, ie an encrypted character may theoretically be anything from 1 to 255 bits long; however this depends on the 'quality' of the key. I am not a cryptoanalyst, but I have a hunch that the variable character length makes this code rather difficult if not impossible to break. One approach may be to scan the encryption for repeating bit-groups and guess the meaning of short groups occuring more frequently than others (like "the", "a", "an" and so forth), or for patterns occuring with a language-specific frequency of vowels and consonants. To forestall that, the encrypting engine uses an initial hash (also derived from the key) and XORs every character with that before encrypting, keeping the result of the XOR for the next character. The decrypting engine of course reverses that process.
The encryption engine now features an MD5 message digester which produces a key- and message-dependent binary signature. This signature may be included in the encrypted text to verify it's authenticity. Another advantage of prefixing a message with a signature is the additional scrambling of the encryted text through the previous encrypting of the unpredictable signature (see 'hash' above). This makes the encryption key- and text-dependent, that is, the encryption for a particular character is different when the text is different (apart from being different through hashing).
Speed (without debugging) is in excess of 40,000 bytes/sec for encrypting and more than 130,000 bps for decrypting (depending of course on your PC's clock frequency).
Original Author: Ulli
About this post
Posted: 2002-06-01
By: ArchiveBot
Viewed: 86 times
Categories
Attachments
Unbreakabl53423262002.zip
Posted: 9/3/2020 3:45:00 PM
Size: 18,022 bytes
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.