Reactive Android Development CS 4593-02T & CS 5463-01T Summer 2016 Encryption Continued
Encoding lots of data Last time, we saw that there was a limit to the size of message that could be encrypted by the RSA algorithm This could be solved by breaking the data into blocks But the cipher text was 50% larger than the clear text
Stream Cipher There are symmetric encryption algorithms that don't increase the messages size nearly as much. But both sides of the conversation must have the same key
Key Exchange There are ways of exchanging keys without fear of eavesdroppers But our clients have published public keys, so we can simply use them.
Log-in Last time, I had proposed that we could use a form of digital signature as a way of logging in. That is, encode a message with your private key, so that the server would know that it really came from the owner of the public key. But I was concerned that doing so would potentially expose your private key
Log-in But there's a simpler way The server can encrypt a random message with the user's public key The user can then decrypt the message and re-encrypt with the server's public key The encrypted message can be used as a session identifier for future communication with the server.
Code Example GitHub UTSA-Reactive-Android-2016 kbaldor CryptoTest