I need to verify a signature, does anyone know of sample
code doing this? Has anyone here done it?
The "RSAPKCS1SignatureDeformatter" has these promising
methods:
- SetHashAlgorithm
- SetKey
- VerifySignature
Specifications:
Hash: SHA-1
Public key encryption: RSA
Library used: Open SSL
The public key looks like this:
e4ca0ac386fe6fc28d33f279ef2d610c1852f8fc154e7164ef6015efba4
9e0e070cd2920b988
875288c56d28bc0853c5e1e239cb774e4f97d475d5bf1db8b0c9a1ffd33
eaaebbd4c95b47bac
065eaeb5d0fc2bfecab4553b9ba767d92dafa7ef46308aabef339d95f24
3ac597a946bdab16b
695bf3922667057df8f18d9247c9010001
best regards,
Geir-Arne Roos.
RSAPCKS1SignatureDeformatter RSAsign = new
RSAPKCS1SignatureDeformatter(rsa);
RSAsing.SetHashAlgorithm("SHA1");
// check signature against pre-calculated hash
if (RSAsign.VerifySignature(baHash, baSignature))
' -- signature is valid
else
' -- signature is invalid
tricks:
rsa is an implementation of RSACryptoServiceProvider where you MUST load
your public key through a RSAParameters class.
"Geir-Arne Roos" <geir-ar...@telenor.com> wrote in message
news:139bf01c1308e$78cffb30$a4e62ecf@tkmsftngxa06...
Do you have any examples of loading a public key?
In RSAParameters, parameter Q is explained like
this: "Represents the Q parameter for the RSA algorithm".
The whole class is like this, if anyone know why, please
tell me why or what I should read to understand this. Is
this part of an RSA-specification?
Best regards,
Geir-Arne
>.
>