Home Assignment 3 (due 12.11.2015)
1. Implement an encryptor-decryptor (5 pts)
Implement a command line program (Java, Python, ..) which can encrypt messages into images, and decrypt such encrypted images, extracting the message contained within.
The encryptor is as follows. The string is embedded into the image, such that the image is still openable (with minor distortions).
The decryptor will take such an encrypted message-image and extract the string from it, and return the original message.
- Deploy the source code of your program to the running cloud instance (e.g. use SCP/SFTP).
- Compile your program on the cloud. Now it should be ready for use, for example with a command: "java myProgram encrypt image.jpg message.txt" or "java myProgram encrypt image.jpg 'this is my secret message'"
2. Design an Android application (10 points)
- Design an Android application which can:
- Use the encryptor/decryptor program on the cloud.
- Encryption: The user selects an image and enters a message for encryption. The cloud program is used to process these inputs and the resulting image is retrieved and stored somewhere where it can be later user for decryption.
- Decryption: The filename to be decrypted is received as a parameter (explain below in the GCM section). The cloud program is once again used: the file is sent to the cloud and the program is called for decryption. Once the result is received from the cloud, the app shows the decrypted message to the user.
- Use the encryptor/decryptor program on the cloud.
3. Add GCM message functionality (10 points)
Add GCM message handling to the Android application. Using the GCM server hosted on the cloud instance, one should be able to send messages to the android app.
- Design a communication protocol, so that the encryption and decryption can be triggered using GCM:
- for encryption, simply specifying the operation type in the protocol is enough.
- for decryption, the gcm message should contain the filename of the image to be decrypted.
- Design a communication protocol, so that the encryption and decryption can be triggered using GCM:
The application should be able to register to the GCM server, and listen to incoming messages, triggering the behaviour as described above.
If you missed the IP address of the cloud instance, ask your co-students for it or write an e-mail.
The GCM server is located at ip:8080/gcm.
Feel free to create additional assumptions or restrictions for your solution, but make sure to document them!