Re: Sign w/ BSafe; Verify w/ MS Crypto; Error: Invalid Signature
From: Ryan Menezes [MSFT] (ryanmen_at_online.microsoft.com)
Date: 03/16/04
- Next message: Ryan Menezes [MSFT]: "Re: CSP testing"
- Previous message: Lisa Lombard: "NetUserSetInfo USER_INFO_X structs"
- In reply to: Emile Deen: "Re: Sign w/ BSafe; Verify w/ MS Crypto; Error: Invalid Signature"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 16 Mar 2004 11:54:47 -0800
It should be pretty straighforward if you have a byte array of size x. Swap
b[0] and b[x], then b[1] and b[x-1] and so forth in a loop.
-- Thanks, Ryan Menezes [MS] This posting is provided "AS IS" with no warranties, and confers no rights. "Emile Deen" <anonymous@discussions.microsoft.com> wrote in message news:809A6C27-2ADC-4770-A5C2-420070F39815@microsoft.com... > Does anyone have any sample code that demo's how to convert from big-endian (Java) to little-endian using C++? > > Also, is there a way to tell which byte ordering is being used? I'm running into the same issue (I think) as the original poster but I have both Java and Crypto-API clients. > > ----- Daniel McGloin wrote: ----- > > "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. >
- Next message: Ryan Menezes [MSFT]: "Re: CSP testing"
- Previous message: Lisa Lombard: "NetUserSetInfo USER_INFO_X structs"
- In reply to: Emile Deen: "Re: Sign w/ BSafe; Verify w/ MS Crypto; Error: Invalid Signature"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|