Re: Sign w/ BSafe; Verify w/ MS Crypto; Error: Invalid Signature

From: Daniel McGloin (dmcgloin_at_san.rr.com)
Date: 12/19/03


Date: 18 Dec 2003 17:55:13 -0800


"Pieter Philippaerts" <Pieter@nospam.mentalis.org> wrote in message news:<OP3XZdZxDHA.2676@tk2msftngp13.phx.gbl>...
> "Daniel McGloin" <dmcgloin@san.rr.com> wrote in message
> > I am getting an error verifying a signature created with BSAFE. The
> > error returned from CryptVerifySignature is NTE_BAD_SIGNATURE. I have
> > tried to verify all inputs (i.e. signature, message file, public key)
> > to make sure they are correct.
>
> Keep in mind that the CryptoAPI uses little endian byte order and that most
> other products use big endian byte order.
> Have you tried reversing the contents of 'signatureKeyData'?
>
> Regards,
> Pieter Philippaerts
> Managed SSL/TLS: http://www.mentalis.org/go.php?sl

Hi Pieter,

Thanks for the tip. The signature is an array of chars. I stepped
through by BSafe test program and inspected this array at the moment
it was output. I'm thinking that there is no byte order issue in the
signature stream since I'm not using ints or longs to store the data.
Perhaps I am wrong or confused about this. So just in case, I tried
flipping the bytes as though it was an array of 2 byte integers - then
I tried this as though it was an array of 4 byte integers. But it
still doesn't work :(.

It seems like this should be relatively straightforward - but I'm just
not getting this.

Uggh, this is driving me nuts!!

Thanks for the help. Any other ideas??

-Daniel



Relevant Pages

  • Re: Store byte array into SQL Server
    ... > I have a byte array called signature. ... sqlCon is a valid SQL connection initialized elsewhere ... > SqlCommand sqlCmd = new SqlCommand ...
    (microsoft.public.dotnet.framework.adonet)
  • Store byte array into SQL Server
    ... I have a byte array called signature. ... SqlCommand sqlCmd = new SqlCommand (sCmd, ...
    (microsoft.public.dotnet.languages.csharp)
  • Store byte array into SQL Server
    ... I have a byte array called signature. ... I'd like to store this byte array in a SQL server varbinary column and then read it back again. ... SqlCommand sqlCmd = new SqlCommand (sCmd, ...
    (microsoft.public.dotnet.framework.adonet)
  • finding anagram of words
    ... Find anagrams of words e.g. rinse, reins, siren, resin are all anagrams ... letters, sorting that array, and joining the letters back into a string. ... So the rinse examples all have signature 'einrs' ...
    (comp.lang.ruby)
  • Re: Formula Help
    ... signature suggests and I will send you demonstration sheet that shows what I ... > The first formula works great. ... > I entered the array correctly with CTRL-SHIFT-ENTER so that's not the ...
    (microsoft.public.excel.worksheet.functions)

Quantcast