I have a scenario that requires me to generate a printed page with encrypted data that can be scanned into our application later. Much like a barcode but encrypted.
The volume of text to be encrypted would be between 1KB to 10KB but could increase in the future. Most likely not above 1MB.
I develop document processing systems so I understand the dos and donts of printing. Scanning usually adds properties to printed pages such as skewing, rotation, artifacts, etc.
So the question is:
- What is the best format to represent this amount of data visually? Not barcodes I’m assuming.
- Whatever the format, real estate is crucial since we want to squeeze the data into a single A4 page. I’m thinking Base64 encoding with code-table compression could be a candidate? Any thoughts.
EDIT: It seems like barcodes are the only viable solution. The data is essentially a series of digits so I could use base 10 and then compress them to a code/index table before encrypting it. Or would using a higher base be wiser here?
My suggestion would be to make a C# program that takes your data, encrypts it, then runs it through a Base64 encoder. Then I would take the Base64 data and create QR code bitmaps from the data. I would then shrink the bitmaps so you can fit a lot on a page, then I would print pages of those QR codes. Later you can scan them in, enlarge each code and then read in the data. Finally, you’d have to Base64 decode it and then decrypt it!