I'm guiding myself with this answer over here, which explains how to use both AES and RSA.
I managed to successfully implement the AES part with an util class in which I use a passphrase to generate keys. This passphrase will not change, the purpose of this is to encrypt a password before encoding it and saving it to a database. Then whenever I need to decrypt this password I can do it with the same passphrase, which should generate the same key. I've got this working.
Now my question begins with RSA. I have to send via JSON through a Java JAX-RS web service the info to register an user. HTTPS/SSL is out of the question for... "tech" reasons. So instead I'm trying to at the very least, send the password encrypted with a public key. and decrypt it with the private key on the server.
I then encrypt it with AES and store it in the database.
How would my client (android) know the public key before any of this even happens if I have to generate different keys every time?