I am developing a solution of two parts : part one is SMS encrypting which will be android based. while part two is to be concerned about the issuing and exchanging public / private keys.
Everything was alright, until i faced this problem : if you are using java cryptography classes, which provide the mod and exp of a key to generate the key object. While all of what i am getting from the server which generates the keys is a pre-computed public key. so, can't get mod nor exp from the server, where i am using phpseclib.
after doing some research: i came with three options, which i need to decide which of them is the best.
1) if there is a way to access the mod & exp from phpseclib , problem will be solved with less amount of time, right ?
2) replacing the native cryptography class in java, with third party like bouncy castle that will take the public key is one parameter.
3) changing the server side language to be JSP. then, i could use the same classes on two sides.
Which one of those solutions will be the easiest to adopt .. ?
Thank you very much.
-----BEGIN PUBLIC KEY----- MIGfAoGXCsLnyw64KfYTd4hjhq6sS+4AhnwgnAm/N/jMEaXtFCMVDfkY48dg5nMcOxjRmuJSK4Qr xDIjCtRyNkBj6nVDjwDGVe4vF5+s7dkI1lwlfOM2kl/zuuUveeYaT1pSehh2gs2j32deIR8o1zhI 0+bCebB+yC+mGND5Ro0dgc6z8AFevSEO12Ww9GP1ZFlTuwRAIt0/e3ZrIQIDAQAB -----END PUBLIC KEY-----