Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Studying encryption algorithms is great fun. Just remember you are playing, not producing anything serious. As long as you are only keeping things like your personal diary (or maybe even passwords) encrypted and you keep the data secure, you will probably be fine. This kind of counts as security through obscurity. I would not recommend encrypting mass quantities of data that you <em>REALLY</em> need to keep private or anything that is available and of interest to the outside world, however.</p> <hr> <p>In this case, if your message is shorter than the key size and hash block size and the key is single use and random, you are effectively using a one-use pad so everything in swell. Provided your random number key generation is perfect, you have an unbreakable encryption mechanism. As you add each block to the message, you are effectively calculating new keys using SHA-512, not adding any particular value. If an attacker can assume the message consists of printable text and if the length of the message is long or the key is used repeatedly, it should would not be too difficult to find the original key.</p> <p>It would be more effective to calculate:</p> <pre><code>M(1)=h(N + key) XOR Message(1) M(2)=h(M(1)) XOR Message(2) M(3)=h(M(2)) XOR Message(3) </code></pre> <p>(where N is the number of times the key has been used which is passed in clear text.)</p> <p>That way the bad guys can’t calculate your key sequence ahead of time and decrypt your message before you can. Also by using a salted hash of the key, the attacker won’t be able to predict the key sequence that will be used next time.</p> <hr> <p>I read somewhere:</p> <ul> <li>The first rule of cryptography is “Cryptography should be left to experts.” </li> <li>The second rule is “You are not an expert.”</li> </ul> <p>There is a reason people get PhDs in things like Computer Science and Mathematics. There is a lot to learn and discover. Something like this looks fine to me but no doubt it has a gaping hole that an attacker could drive a truck through.</p> <p>Have fun and don't let grouchy people like me get you down. /Bob Bryan</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload