RunJS
The third demo screenshot [1], which contains a toy implementation of AES in CBC mode, is a great example of why cryptography is hard to get right. Implementation is best left to cryptographers.<p>AES-CBC requires a random IV to be used as a nonce on a per-message basis, otherwise the entire scheme breaks. The toy example given on this website uses the deprecated Node.js createCipher [2] API which does not take such an IV. In fact, the docs and runtime even warn that using CBC mode with the createCipher API is dangerous!<p>As the code is currently written, an attacker observing multiple encrypted messages under the same key could probably decrypt all messages!<p>[1] <a href="https:&#x2F;&#x2F;projects.lukehaas.me&#x2F;runjs&#x2F;images&#x2F;runjs3.png" rel="nofollow">https:&#x2F;&#x2F;projects.lukehaas.me&#x2F;runjs&#x2F;images&#x2F;runjs3.png</a><p>[2] <a href="https:&#x2F;&#x2F;nodejs.org&#x2F;api&#x2F;crypto.html#crypto_crypto_createcipher_algorithm_password_options" rel="nofollow">https:&#x2F;&#x2F;nodejs.org&#x2F;api&#x2F;crypto.html#crypto_crypto_createciphe...</a>