The RSA Decryption app demonstrates how to use RSA decryption in order to decrypt RSA-encrypted text in plain or barcode format. The app is structured into two modules or steps:
- Scanning of the RSA private key in QR code format
- Scanning of the encrypted text
- The app uses ZXing ("Zebra Crossing") barcode scanning library to scan the QR codes.
- The app uses MLKit Vision API for live camera analysis to detect barcodes and text.
- Download the repository and open it with Android Studio.
- In the app-level build.gradle change the name of the app from "com.example.mlkit_barcode_ocr" to your desired name.
- Register the app with Firebase, download the .json file and add it in the app folder.
It is recommended that you deploy the app on an Android device, because of the scanning capabilities that are easier to use on a phone. However, if you want to use the Android emulator, you can make the most of the app by changing the camera settings of the emulator to the computer's webcam. Under Tools > AVD Manager, select the "pencil" to get to "Virtual Device Configuration". Show Advanced Settings > Camera will give you the option of using emulated, webcam0 or none. Select Webcam0 for the Front camera.
Press run. The rest of the instructions are shown on the screen.
.
As a first stem, you will have to scan the private key in QR format. Some examples can be found under Tests/.