From what I can see, jwt-simple is not secure against chosen message attacks, why not use crypto.createCipheriv( algorithm, key, iv, options ) ? Passing a random IV on each request ensures the key is secure.