Inspiration

I actually thought of this in the shower. Though my major is Computer Science, I have a strong passion for learning Japanese, which led to an interest in the cultural influence of Chinese characters, which not only Japan uses, but also Korea and Vietnam (though not anymore). The pronunciation of these characters has branched since their borrowing from Middle Chinese, leading to the same character having different pronunciations in these four languages. While working on another personal project of mine, a Japanese dictionary mobile app, while parsing and poring through endless entries of SQL, I realized that this could be used to encrypt and safely store text in a format that was utterly incomprehensible to both those who were familiar and unfamiliar with these characters.

What it does

The cypher uses a key stored in Base-4 (with each number representing the four languages that each character has a reading in), and each letter of what's being encrypted will use that key to decide what language character it will use. Each character has different readings in up to 4 languages, so the same character can represent different letters, governed by the key. This is what makes this method of cryptography so effective: Over 15,000 characters, each character can represent several different letters, which is based on linguistics and cultural history so there is no way to systematically reverse engineer. In addition, since each letter can be represented with several hundred different characters (The letter A is represented in Japanese by over 700 characters!), even encrypting the same string with the same key will lead to quite literally infinite permutations of encrypted strings. A very, VERY large sample size of sample text will be required to make cracking remotely feasible.

How we built it

We decided to use a simple webpage powered by React and Vite for this project. The code itself is fairly simple; rather the complexity lies in the idea and concepts of this algorithm that makes this so interesting.

Challenges we ran into

Though encryption was fairly easy to implement, we faced several issues with implementing decryption independent of encryption, mainly due to the fact that some sounds (and therefore letters) not existing in some languages. However, after hours of searching for a solution, we found a non-lossy method to decrypt encrypted strings. Aside from this issue, we only faced collaboration issues pushing and pulling from Git, as neither of us were familiar with using Git in a non-solo environment, but in the end everything worked out.

Accomplishments that we're proud of

We are very happy with our end result: a polished, interactive modern webpage that not only has efficient functionality but also personality, such as the hover effects and accessibility settings such as a dark mode toggle, as well as support for all devices and screen sizes. We are proud of our ability to work together to realize this abstract, shower thought of a project into a truly creative and one-of-a-kind approach to cryptography.

What we learned

Through this project, we brushed up on our React skills, learned some new methods of doing things such as using TailwindCSS for styling, and learned to solve problems together after having just met. This project has been a test of both technical and interpersonal skills in order to realize this idea.

What's next for KanjiCrypt

Having been made in mere hours, there are of course improvements that can be made. For starters, the sample database of characters is taken from only one Japanese dictionary of only some 15,000 characters. The efficacy of the cypher can be increased exponentially by consulting a more comprehensive source, such as crawling Wiktionary for every Chinese character and getting each reading in all 4 (and possibly more!) languages, possibly adding tens of thousands if not hundreds more characters, increasing the robustness of the cypher by increasing the sample of characters it has access to. In addition, the encryption and decryption algorithms, though functional, are fairly basic, and can be expanded upon to increase reliability and robustness.

Built With

Share this project:

Updates