Does anyone know of a signing algorithm that will work with all these platforms.
The Server will generate an RSA public and private key through a Java Program. The client application (a mobile phone) will then need to decode a message from the server that is signed using the private key (the public key is stored on the device).
The values below work with Android and Java, however, I am not sure about how they will work with other platforms.
//For the server signed message
public static final int RSA_KEY_SIZE = 2048;
public static final String SIGNATURE_ALGORITHM = "SHA256withRSA";
public static final String RSA = "RSA";
public static final String PROVIDER = "BC"; //Bouncy Castle
//For hashing sensitive data over the network
public static final String SECURE_RANDOM_ALGORITHM = "SHA1PRNG";
One of the points of standardised cryptographic algorithms is that they are interoperable, no matter what code was used to implement them. Thus for example RSA-encrypted message can be created by a server written in Java and decrypted by a .Net client (think about how webservers communicate with browsers using HTTPS – there are no restrictions on which languages can you use to write a server/webbrowser).
For Windows Mobile, there’s a Bouncy Castle crypto API implementation available (Compact Framework). For iPhone Objective-C code, some reference can be found in this StackOverflow question.