Reputation: 13517
In signature method in xml signature you have specify in this format : SignatureMethod.RSA_SHA1
but when using normal signature you just do
Cipher c1=Cipher.getInstance("RSA");
So what is the difference between these two?
Upvotes: 0
Views: 776
Reputation: 89169
The difference is simple:
RSA
is a (public-key) cryptography algorithm, where the public key is used to encrypt important message. The encrypted data must be decrypted with the private key.
RSA-SHA1
, on the other hand, is a combination of RSA
cryptography + SHA1
Message Digest. A message digest is a one-way hashing function, which has four main or significant properties:
In Digital Signature, one would want a guarantee that the signature is valid from sender to receiver. A signature is created through a cryptographic algorithm (e.g. RSA
) and then a verification process is done to public key, message, and signature through a hashing function (e.g. SHA-1
) for authenticity.
Upvotes: 2