I have a java application that needs to connect to a server. Its rather simple to ensure that the server is not spoofed using SSL but I can't seem to wrap my head around on how the server would authenticate the client to ensure that the request is coming only from a trusted party. Only the first communication needs to be authenticated. During that communication step the client and the server will exchange some information that will be used to subsequently authenticate the client.
One approach I can think of is to digitally sign the application and then send the digital signature of the application to the server. The server verifies the digital signature to authenticate the client. Now I have a couple of questions regarding this:
- Is it possible to get the application's digital signature from within itself. If it is, then how? (I've tried searching for this on the internet but couldn't find any way to do so)
- Is it possible to extract this signature using other means such as a HEX editor. If this is known then anyone can just send that signature to the server and spoof the client.
Also, please let me know if I am totally on the wrong track here :)
EDIT: By "trusted party" i mean an "Unmodified client"