Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>The system you are building is probably insecure</h2> <p>Except for storage you basically never want to just encrypt your data, but also <strong>authenticate</strong> it. Authentication in this context means that a valid message can only be generated by someone who knows the key. A widely used authentication scheme is <a href="http://en.wikipedia.org/wiki/HMAC">HMAC</a>. </p> <p>If you do not authenticate your messages anyone can feed data into your service. An attacker might not be able to fully control the outcome after decryption but he/she might still be very dangerous. For example, if you use CBC (which you do) and the most common paddings schemes (AES is a block cipher and can only encrypt 128bit Blocks of data) and an attacker can differentiate between a padding error and any other error then <em>all your messages can be decrypted by an attacker</em>. This is called a <a href="http://www.skullsecurity.org/blog/2013/a-padding-oracle-example">padding oracle attack</a> and is <em>far</em> too common. </p> <p>To protect from this class of attacks you can use an <strong>authenticated encryption scheme</strong>, for example the <a href="http://en.wikipedia.org/wiki/Galois/Counter_Mode">GCM</a> blockcipher mode.</p> <p>Also you have to protect against <strong><a href="http://en.wikipedia.org/wiki/Replay_attack">replay attacks</a></strong>. Consider a banking application and the data you are transmitting is a bank transfer order. Barring any TAN an attacker might record a previous transaction and replay this transaction to your service again and again thus transferring a multiple of the money the customer originally wanted to.</p> <p>Is the form you are getting the data from transmitted over HTTPS? If not: Can the key be eavesdropped by an attacker? How does a user know he got the form from you and not anybody else (SSL/TLS is as much about authentication as it is about confidentiality).</p> <p>Probably I have forgotten some other attack vectors simple CBC-encryption offers.</p> <h2>Alternatives</h2> <p>Probably the easiest way to protect against these attacks is to transmit the form data over HTTPS. SSL/TLS was designed to prevent all of the above attacks and the client and server side implementations had a long time to mature.</p>
    singulars
    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.
    1. VO
      singulars
      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