Search code examples
javarsadigital-signaturesha1

JAVA: Using RSA and SHA-1 need to transmit data from client to server (Digital Signature)


My requirement is to write a JAVA program which provides confidentiality and integrity of data transmission from a client to the server.

For which am planning to use RSA and SHA-1 hash methods. Also need to set up a network connection between a client and a server and exchange the message. Server should verify the signature and check for the integrity.

So I just wanted to know, is there any documents which would help me in writing it.

Any help appreciated. Thanks


Solution

  • It would be better to try it yourself using code I guess. - http://www.programcreek.com/java-api-examples/java.security.KeyPair

    In using Java, you can use javax.security Keypair using RSA and SHA-1, sign with the parameters you wanted to include. Send private key to server, then each time you request something, verify at the server with public key of generated keypair with correct parameters.