Encrypting QR Codes with Qrafter

Users of Qrafter and Qrafter Pro can protect QR code contents with password-based encryption. To enable this feature, tap the Encrypt button on the scan results screen.

Encryption Evolution

Older versions of Qrafter utilized DES encryption. While functional, DES is considered weak by modern standards and can be cracked relatively easily. I originally chose DES for two reasons: compliance with export regulations at the time, and minimal expansion of the content size.

Newer versions of Qrafter switched to AES-256 when encrypting QR Codes. This upgrade provides industry-standard encryption that you can use confidently without worrying about your codes being cracked.

AES-256 is the same encryption standard used by governments and financial institutions worldwide to protect sensitive data.

The trade-off with stronger encryption is increased data size. As a result, you cannot encrypt extremely lengthy content (exceeding several thousand characters). For most use cases, this limitation is not a concern.

Technical Implementation

Qrafter implements encryption through the RNCryptor library. I selected this library because its developer follows strict standards for encryption and the implementation has been thoroughly audited.

How It Works

The encryption process follows this sequence:

  1. Your content is encrypted using RNCryptor with your chosen password
  2. The encrypted data is then Base64 encoded
  3. The prefix ENC: is prepended to identify the content as encrypted

Encrypted Format

The final format of an encrypted QR code looks like this:

Format
ENC:BASE64_ENCODED_ENCRYPTED_CONTENT

For example, if you encrypt the text "Hello World" with a password, the resulting QR code content might look something like:

Example
ENC:AwHsr8JQkj8K3m9+JGS...

Decryption

When you scan an encrypted QR code with Qrafter, the app automatically detects the ENC: prefix and prompts you for the password. Once you enter the correct password, the content is decrypted and displayed.

External Decryption

If you need to decrypt Qrafter-encrypted content outside of the app, follow these steps:

  1. Remove the ENC: prefix from the content
  2. Base64 decode the remaining string
  3. Decrypt using RNCryptor with the appropriate password

RNCryptor libraries are available for multiple programming languages including Swift, Objective-C, Python, JavaScript, PHP, Ruby, and more.

Best Practices

  • Use strong passwords - Combine uppercase, lowercase, numbers, and symbols
  • Don't share passwords with the QR code - Communicate passwords through a separate secure channel
  • Keep content concise - Shorter content creates smaller, more scannable QR codes
  • Test your codes - Always verify encrypted codes can be scanned and decrypted successfully

Encryption in Qrafter provides a simple yet powerful way to protect sensitive information in your QR codes. Whether you're sharing confidential business data, personal information, or secure access credentials, you can trust that your content remains private.