Search code examples
javasecuritysign

Which digital signature algorithm to choose for multi-platform use?


I have a Java written web service verifying digitally signed requests via public keys. Clients could be written in different languages, PHP for example. So I want to choose an key/signing algorithm wisely... For example, official Java tutorial on signing offers DSA keys and SHA1withDSA signature but there are some complains for using the latter with PHP.

Which signing algorithm could I choose?

  1. Commonly accepted as being strong enough
  2. Having good support in standard Java at Linux
  3. Having good support at other recognized programming platforms

Solution

  • RSA. Java has a ton of libraries for it and it is the most widely used. Shouldn't use SHA1 either.