Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
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.

Link to post
Share on other sites

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
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.