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 18:18:45 -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

Wait! You're right!!! I needed to reverse the entire 64 byte stream.
 I still don't understand this. But it works and I am very happy and
I am going to leave work and go home!

Thanks very, very much. You made my day.



Relevant Pages

  • Re: Sign w/ BSafe; Verify w/ MS Crypto; Error: Invalid Signature
    ... >> I am getting an error verifying a signature created with BSAFE. ... > other products use big endian byte order. ... > Have you tried reversing the contents of 'signatureKeyData'? ...
    (microsoft.public.platformsdk.security)
  • Re: Trouble verifying RSA signature generated with c#
    ... Reversing the signature bits fixed my problem. ... The signature blob generated oRSA.Sign is in standard big-endian order. ... BOOL GetFileBytes(LPCWSTR path, BYTE** buffer, ULONGLONG& bufferSize) ...
    (microsoft.public.platformsdk.security)
  • Re: abelard on the fossil media (before it printed articles she agreed with)
    ... >>> One question about that signature, Pete. ... >> what on earth makes a link in your mind between walking and stalking... ... >> do you have yearnings for your very own stalker? ...
    (uk.politics.misc)
  • Re: Most negative double value
    ... Christian Bau wrote: ... this is right if I am writing robust code to run everywhere... ... >>tries to find machine endianess and is part of my signature... ... >>endian or little endian... ...
    (comp.lang.c)
  • Re: HELP: VerifySignature
    ... that problem may be reversing the bites. ... the signature from CAPI reverse the bites so that first bite comes on last ... >> I could verify the openssl generated sig with the same function. ...
    (microsoft.public.platformsdk.security)