Encrypting QR Codes with Qrafter

Using Qrafter or Qrafter Pro, you can easily encrypt the contents of a generated QR Code, so that the content can only be revealed with the correct password. To do this, tap the padlock icon that can be found at the bottom right of the QR Code screen on iPhone, or next to the generated QR Code on iPad.

Prior to version 17.3, the codes were encrypted using DES encryption which made it some kind of a gimmick. DES encryption is weak and can easily be cracked. I had chosen DES only for practical reasons on export regulations and for the fact that the encrypted content would not be much bigger than the original content.

With version 17.3 and later, Qrafter and Qrafter Pro use AES-256 when encrypting QR Codes. This means the content is encrypted using industry standard encryption and can be used with confidence in any case without the risk of easy cracking. The only downside of strong encryption is, the AES-256 encrypted content is longer than DES encrypted content. You will not be able to encrypt content that is very long (more than a couple thousand characters).

For encryption, Qrafter and Qrafter Pro now use RNCryptor. I chose this library over others because its developer follows strict standards for encryption, and that is similar to my approach to writing code. Without established standards, apps don’t perform as expected, resulting in poor usability.

Qrafter and Qrafter Pro first encrypt the content using RNCryptor, base64 encode the whole encrypted data and then prepend ENC: to the resulting base64 encoded string resulting in the following format:

ENC:BASE64_ENCODED_ENCRYPTED_CONTENT

If you would like to decrypt the content yourself on your app or webpage after scanning, first base64 decode the BASE64_ENCODED_ENCRYPTED_CONTENT and then decrypt the resulting data using RNCryptor with default settings, using the correct password.

Comments are closed.