Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

signature verification

0 views
Skip to first unread message

Geir-Arne Roos

unread,
Aug 29, 2001, 9:28:21 AM8/29/01
to
Hi,

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.


Marcello Drewanz

unread,
Sep 5, 2001, 4:28:16 PM9/5/01
to
Don't know if you still need it, but here you have:

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...

geir.ar...@accenture.com

unread,
Sep 7, 2001, 3:54:00 AM9/7/01
to
Hi,

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

>.
>

0 new messages