Re: How to verify specified signature in .NET using RSA
- From: "Joe Kaplan" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 24 Jul 2009 10:13:06 -0500
Did you try it with the code change I suggested? Otherwise, why are you converting the signed token provided as Base64 into a byte array and then back into a string and then back into a byte array again instead of converting it directly to a byte array as I suggested? Do you have some sort of specification for this protocol that suggests you should do that? It seems less likely to be the right way to this since the signature data is probably arbitrary binary data which would encode properly as Base64 but might not have a valid string representation in ASCII since ASCII allows a much reduced set of characters and will not deal well with unprintable values and nulls.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
"imran arshad via DotNetMonster.com" <u53508@uwe> wrote in message news:998e396bcb302@xxxxxx
Actually I am not generating the signature data. Signature data is generated
in different applications send a request to logon on my site. I authenticate
the request using RSA VerifyData. A public key is already provided to
authenticate the request.
Signature data and plain text is sent in query string where signature data is
encoded in base64. I decode it and create byte array of signature data and
plaint text and passed these byte array to VerifyData. Is there any thing I
am missing ?
Joe Kaplan wrote:Are you sure you are generating the signature data correctly? That code
looks very weird to me. If the data was supplied as base64, I would expect
you would instead have something more like this:
byte[] signature = Convert.FromBase64String(SignedToken);
Without knowing how the data was generated, it is hard to say. These types
of problems usually result from either not using the correct key data or not
using the correct plaintext or signature value.
I want to verify the sign data encrypted in other than .NET language using[quoted text clipped - 52 lines]
RSA algorithm. I have public key, Signdata and Signature.Bellow is the
}
--
Imran Arshad
Message posted via http://www.dotnetmonster.com
.
- Follow-Ups:
- Re: How to verify specified signature in .NET using RSA
- From: imranarshad via DotNetMonster.com
- Re: How to verify specified signature in .NET using RSA
- References:
- How to verify specified signature in .NET using RSA
- From: imranarshad
- Re: How to verify specified signature in .NET using RSA
- From: Joe Kaplan
- Re: How to verify specified signature in .NET using RSA
- From: imran arshad via DotNetMonster.com
- How to verify specified signature in .NET using RSA
- Prev by Date: Re: How to verify specified signature in .NET using RSA
- Next by Date: How do I approach this (typical scenario)
- Previous by thread: Re: How to verify specified signature in .NET using RSA
- Next by thread: Re: How to verify specified signature in .NET using RSA
- Index(es):
Relevant Pages
|