dark theme warning

github gist embeddings are white! save your eyes! last warning!

goto home


date: 2020-09-10 tags: python cryptography type: post


exception

emojipher

Symmetric cryptographic means of encryption based on Unicode Emoji standard implemented with Python programming language using secure standard library modules employing user-first design practices and clean architecture standards. ๐Ÿคก

For example, this text:

The real reason you can’t invade Australia is because it doesn’t exist. Australia is not real. Itโ€™s a hoax, made for us to believe that Britain moved over their criminals to someplace. In reality, all these criminals were loaded off the ships into the waters, drowning before they could see land ever again. Itโ€™s a coverup for one of the greatest mass murders in history, made by one of the most prominent empires.

Becomes this:

๐Ÿš๐Ÿˆต๐Ÿช€๐Ÿ‘ฟ๐Ÿ’ฌ๐Ÿ‡๐Ÿฆ๐Ÿ˜ง๐Ÿ’ฏ๐Ÿ’ฌ๐Ÿช€๐Ÿชœ๐Ÿ€„๓ ๐Ÿงโ™๐ŸชŸ๐Ÿงฅ๐Ÿ•’โ™๐Ÿ‘ˆ๐Ÿ’…๐Ÿช๓ ž๐ŸŒ—๐Ÿˆ๐Ÿ’Š๐Ÿช๐Ÿ‡ง๐Ÿฆ๐Ÿ” ๐Ÿช€๐Ÿ‘ฟ๐Ÿฆœ๐Ÿชณ๐Ÿ€„๐Ÿ˜ผ๐Ÿ“น๐Ÿ’…๐Ÿฅป๐Ÿ“ฌ๓ Ž๐Ÿˆ๐Ÿšผ๐Ÿ‘ค๐Ÿ’ฏ๐Ÿญ๐Ÿ‡๐Ÿ•˜๐Ÿชœ๐ŸŒ๐Ÿงท๐Ÿ‡ธ๐Ÿ‘ฟ๐Ÿ“ฌ๐ŸŒ—๐Ÿ‘ฟ๐Ÿšค๐Ÿค๐Ÿ‡ธ๐Ÿ€„โฌœ๐Ÿ“–๐Ÿ˜ผโ™๐Ÿ‡ธ๐Ÿ™๐Ÿฆธ๐Ÿ‘ค๐Ÿ•ก๐Ÿช—๐Ÿ‘ฟ๐Ÿฆœ๐Ÿ’ฟ๐Ÿ‘ค๐Ÿ˜ผ๐Ÿ“น๐Ÿ’…๐Ÿš‚๐Ÿ“ฌ๐Ÿ’…โ™๐Ÿ“ฌ๐ŸŽ“๐Ÿˆโฌœ๐Ÿคจ๐Ÿ•กโ™๐Ÿ›•๐Ÿ‡๐Ÿ’…๐Ÿ˜ง๐Ÿ›‚๐Ÿ˜ด๐Ÿ’ด๐Ÿ•กโ™ฟ๐Ÿ•Ž๐Ÿชฃ๐Ÿ‘ค๐Ÿ˜ด๓ Ž๐Ÿ’ฏ๐ŸŽ‚๐Ÿงฅ๐Ÿชœ๐ŸŽถ๐Ÿ•ง๐Ÿ’ฏ๓ ง๓ Ž๐Ÿšค๐Ÿ‡ธ๐Ÿ˜ด๐Ÿ• ๐Ÿคจ๐Ÿ“น๐Ÿ˜ด๐ŸŒ๐ŸŽ“๐Ÿˆ๐Ÿ˜ผ๐Ÿฅธโœจ๐Ÿญ๐Ÿ‡๐Ÿฅป๐Ÿ”ฎ๐Ÿ‡ธ๐Ÿ‡ง๐Ÿ‡๐Ÿ˜ด๐Ÿ•ก๐ŸŽ‚๐Ÿชœ๐Ÿ•ก๐Ÿˆ๓ ฝ๐Ÿ“น๐Ÿšผ๐ŸŒ—๓ Ž๐Ÿšผ๐Ÿง๐Ÿ‘ฟ๐Ÿซ”๐Ÿงฅ๓ €ฉ๐Ÿ‡๐Ÿ” โ™๐Ÿงฅ๐Ÿง–๐Ÿ‡๐Ÿ›•โœจ๐Ÿ˜ผ๐Ÿˆต๐Ÿช€๐Ÿ”ฎ๐Ÿ’ฌโ™๐Ÿ•˜๐Ÿ“น๐Ÿšผ๐Ÿซ”๐Ÿšผ๐Ÿช๓ Ž๐Ÿ˜ง๐Ÿงท๐Ÿ˜ด๐Ÿ˜ผ๐Ÿคโ™๐ŸŽ“๐Ÿฅธ๓ ง๐Ÿ‡๐Ÿ†๐Ÿ˜ง๐Ÿฆ๐Ÿ„๐Ÿช€๐Ÿƒ๐Ÿˆ๐Ÿ—ผ๐Ÿช๐Ÿ˜ด๐Ÿ›•๐Ÿ‡ธ๓ Ž๐Ÿข๐Ÿ”ฎ๐Ÿ˜ผ๐Ÿ“ž๐Ÿš˜๐Ÿ’ฏ๐Ÿชœ๐Ÿฅป๐Ÿ˜ง๐Ÿ‘ฟ๐Ÿ•ก๐Ÿ”ฒ๐Ÿ‡๐Ÿ€„๐Ÿ‡ธโ™๐Ÿซ’๐Ÿ’ฌ๐Ÿšผ๐Ÿ‘ฐ๐Ÿ”ฎโฌœ๐Ÿฆ๐Ÿข๐Ÿงท๐Ÿˆ๐Ÿ•š๐Ÿ‡๐Ÿ’ฌ๐Ÿช€๐Ÿ‘ฟ๐Ÿ˜ง๓ ๐Ÿชœ๐Ÿ” ๐Ÿช€๐Ÿˆ๐Ÿ’ฏ๐Ÿค๐Ÿ• โžฟโœจ๐Ÿ˜ผ๐Ÿ†™๐Ÿ‡ธ๐Ÿ˜ด๐Ÿงท๐Ÿˆต๐Ÿ”ฎ๐Ÿ”Š๐ŸŽ“๐Ÿ’ฏ๐Ÿ“ฌ๐Ÿช๐Ÿ˜ผ๐Ÿงฅ๐Ÿ˜ด๐ŸŒ—๐Ÿ”ฒ๐Ÿช€๐Ÿ’ฏ๓ €๐Ÿชœ๐ŸŒ—๐Ÿ‡ธ๐Ÿ“น๐Ÿ‘ค๐Ÿš˜๐Ÿ˜ด๐Ÿ” ๐Ÿ›•๐Ÿค๓ •๐Ÿช๐Ÿฆธ๐Ÿง๐ŸŽน๐Ÿ‘ฟ๐Ÿญ๐Ÿ‡๐Ÿ“๐Ÿค๐Ÿ›•๐Ÿ‡โœจ๐ŸŒ—๐ŸคŽ๐Ÿ‡ธ๐ŸŽ ๐Ÿ˜ด๐Ÿซ’๐Ÿคจ๐ŸŒ๐Ÿฅป๐Ÿˆ๐Ÿ’ฏ๐Ÿ‘ค๐Ÿ‡๐Ÿช€โœจ๐Ÿ˜ง๐Ÿชœโฌœ๐Ÿ” ๐Ÿˆ๐Ÿ‡ธ๐Ÿง–๐Ÿช€๐Ÿ’ฌ๐Ÿ˜ด๐Ÿฆ๐ŸŽน๐Ÿ’…๐Ÿฆธ๐Ÿช๐Ÿƒโ™๐Ÿ’ด๐ŸŒ—โ™ฟ๐ŸŒ ๐Ÿ‡ด๐Ÿ‘ค๐Ÿˆ๐Ÿ’…โ™๐Ÿ„๐Ÿค๐Ÿ‡ง๐Ÿช€๐Ÿ›•๐ŸŒ๐Ÿ“’๐Ÿˆ๐Ÿฆž๓ ๐Ÿ›•๐Ÿ’ฏ๐Ÿฅธ๐Ÿง๐Ÿ‡ธ๐Ÿˆ๐Ÿค๐Ÿ“๐Ÿ‘ฟ๐Ÿ˜ผ๐Ÿˆต๐Ÿ‡ธ๐Ÿ‘ฟ๐Ÿธ๐Ÿ“น๐Ÿ‡ธ๓ Ž๐Ÿ˜ผ๐Ÿ‡๐Ÿ€„๐Ÿ˜ผ๐Ÿ‘ฟ๐Ÿ‘ฐ๐Ÿฆ๐Ÿงท๐ŸŽ“๐Ÿ˜ด๐Ÿ‘ฐ๐Ÿ•’๐Ÿ’ฌ๐Ÿ•๐Ÿ‡๐Ÿ’ฌ๐ŸŽ“๐Ÿˆ๐Ÿ”ฎโฌœ๐Ÿ’ฏ๐ŸŽ‚๐Ÿ“ฌ๐Ÿ‘ค๐Ÿ˜ผ๐Ÿงฅ๐Ÿ›•๐Ÿ‘ฏ๐Ÿš˜โ™๐Ÿซ”๐Ÿฆ๐Ÿ•๐Ÿ‡ธโ™๐Ÿงด๐Ÿ‘ฏ๐Ÿ˜ด๐Ÿคโฌœ๐Ÿ‡โ™๐Ÿฅธ๐Ÿฆž๐Ÿˆ๐Ÿ˜ผ๐Ÿ‘€๐Ÿช€โœจ๐Ÿ‘ฐ๐Ÿคจ๐Ÿ€„๐Ÿ•ก๐Ÿ˜ด๐Ÿ†๐Ÿ“น๓ ๐Ÿ‘ฐ๐Ÿฆธ๐Ÿง๐Ÿ‡๐Ÿง๐Ÿ•ก๐Ÿˆ๐Ÿ‡๐Ÿ‘ฐ๐Ÿ“Ÿ๐Ÿšผ๐Ÿ›•๐Ÿ‡ธ๐ŸŽ“๐Ÿƒ๐Ÿ‘ฟ๐ŸŽ€

I built this piece of code to express myself as a true zoomer. Sadly, I could not add any Fortnite features or the inability to install printer drivers to this code. But I did succeed to: - Make an encryption algorithm that uses emojis! - Make an encryption algorithm that increases data size, because more is better, even more, when it comes to the web! If your application is fast, it ain’t modern. - It is written in Python. - It uses async for everything. Does it improve performance? Maybe. But it looks way cooler if I tell you that my Python code uses async, generators, decorators, and walrus operators.

How does it work? If you are still reading this… no, you probably aren’t. It works by installing a botnet on your device which tunnels traffic from my free VPN project I am working on /s. I drank a liter of Cherry Pepsi today, I think I like it. Tastes pretty good with a glass full of ice. Okay, back to the project.

Emojipher works by creating a dictionary of byte values mapped to emoji lists. There are 256 different bytes, so each byte gets one to four emojis assigned to it. This should make it resistant to frequency analysis. (I came up with this when we got an introduction to Vigenรจre Cipher). Emoji is way more than a byte, so it also works as a bloat algorithm.

Do you want to slow down the internet? You want to fill up NSA and Google servers with useless data? I am here to help you. Encrypting data takes the input file, reads it byte by byte, and replaces it with a random emoji from the key dictionary.

The output file is just a massive text file of emojis. Decrypting is the reverse operation: read emojis, get byte it represents. Make a new file with decrypted content. I have tested it on two whole files. I have not done any more testing.

Is it crypto safe? Unlikely. Is it good crypto? Unlikely, you will still have to send your friend the key you generated. Is it funny? It is for me. I jokingly added this to my resume. And I got no job :(

yup

Yeah, I’ve inlined the whole source file in this post. You can take a look at hardcoded list of >1000 emoji: