Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • Announcements

    • Lizzy Trickster

      Latest Stable OpenComputers Version   11/26/16

      The latest released version of OpenComputers is version 1.7 for MC 1.7.10, 1.8.9, 1.9.4, 1.10.2, 1.11.2 & 1.12.1. See more information here! Beta/Dev builds can be found at the Jenkins Build Server (ci.cil.li)
AlexINF

Caesar Hashing

Recommended Posts

Okay, so I'd like to discuss with you a "new" topic that I came up with not so long ago.

I have no idea if it is patented or invented already, if so, tell me. [EDIT: It was invented already, and it is called "Vigenère cipher"]

It consists of a new hashing method. And, as far as I have investigated, it's pretty secure.

It works like so: There are 3 variables, the text to hash, the key, and the dictionary. The text to hash is just text formed from letters of the dictionary, the key is used to encrypt the text, and the dictionary lists the characters that form the text.

So, you might have heard about the caesar ciphering technique. If not, you'll want to read this article in wikipedia.

Well, this method works the same as the original technique, but the key tells each character how much shift you have to apply.

Let me explain. Imagine the text is "hello", the key "1 2 3 4 5 right" and the dictionary all the letters of the english alphabet (abcdefgh...)

Then, you grab the first letter of the text (h) and right shift them 1 character, as said in the key. That would result in an "i". Then you do the same with all the letters, and you get... "igqrt". There you go, your hashed text.

That's not all. If you want, you can resemble another words making the key shifting each letter to the one in the word you want to create.

Is it secure?
Yeah. And pretty fast, too. There's no way of getting any of the other variables unless you already have 2 of them (Example, you can't get the key just with the password, you also need the text.)
If you want a lot of security, just make a large password, and a huge dictionary.

 

That's all. Thanks for reading.

Share this post


Link to post
Share on other sites
Posted (edited)

The Vigenère cipher is vulnerable to cryptanalysis. Unless the length of key equals to the length of plaintext, the cipher IS NOT secure. Generation of such key, which also must be random and not used previously, isn't an easy task. In such case, because the cryptographic strength is provided by the key instead of the cipher (in other words, it's an OTP system), you can simply XOR the plaintext with the key instead of using this cipher and get the same strength.

This cipher might be used to encrypt short pieces of text, but for relatively large pieces, especially when the attacker knows the structure of plaintext (like a TLS packet, although TLS 1.2 doesn't have any ciphersuites with the Vigenère cipher, thankfully) it makes more sense to use stronger ciphers (e.g. AES).

 

Also, hashing and encryption are completely different things. Hashing function is one-way: given the output, you can't calculate the input without using bruteforce. Though an encrypted text can be decrypted.

Edited by Fingercomp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×