I'm learning encryption. I made some keys, encoded a sample string ("1234 5678 9012 3456") and was able to decode it no problem. The first part is working fine.
Then I tried it with a sample of the real data that I want to encode, and got a "data to large for key size" error.
The string length is 14041 characters, and the final product may be larger still, so how do I make it work without having a 1024000 bit key or something crazy like that?
Edit: As I've already learned some stuff from when this was opened a few hours ago, the current method I've been playing with uses RSA, since that is the default for openssl_pkey_new.
Basically, I have a mobile app and I want to be able to update the in app data in the most secure way possible. My boss is a bit paranoid about "the cloud". My idea is to use RSA or something to validate the app with a web API page, get the most up to date data from the database that has been encoded, and the decode it in the app for storage in order to avoid having to push out a new version each time the apps data is updated (couple times a year).
My boss really doesn't like the thought of it leaking data, so any thing I can do to lock it down would be good.