Re: C++ and C# cryptography compatibility
From: Michel Gallant (neutron_at_NOSPAMistar.ca)
Date: 03/29/04
- Next message: Gene: "NT AUTORITY/ANONIMOYS LOGIN events in Event Viewer"
- Previous message: Walter Poupore [MS]: "RE: Yellow Exclamation in Certificate display?"
- In reply to: Pieter Philippaerts: "Re: C++ and C# cryptography compatibility"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 29 Mar 2004 14:59:19 -0500
However CryptoAPI CryptEncrypt() generates ciphertext in exactly the same order
as .NET generates ciphertext. (Note that CryptEncrypt with RSA asymmetric encryption
DOES reverse the order of the ciphertext output.)
The only issue is the encryption block which CryptoAPI reverses (compared
to standard PKCS #1 encryption block order) as described here:
"Pieter Philippaerts" <Pieter@nospam.mentalis.org> wrote in message
news:ualJ89ZFEHA.1064@TK2MSFTNGP12.phx.gbl...
> "Michel Gallant" <neutron@NOSPAMistar.ca> wrote in message
> > - there shouldn't be any issue with Endian-ness for symmetric encryption
>
> CryptoAPI's symmetric keys are imported in little endian byte order, while
> .NET uses big endian byte order.
> So you'll need to reverse the symmetric key you're using in .NET when
> importing it with the CryptoAPI [or vice versa].
>
> Regards,
> Pieter Philippaerts
> http://mentalis.org/go.php?sl
>
>
- Next message: Gene: "NT AUTORITY/ANONIMOYS LOGIN events in Event Viewer"
- Previous message: Walter Poupore [MS]: "RE: Yellow Exclamation in Certificate display?"
- In reply to: Pieter Philippaerts: "Re: C++ and C# cryptography compatibility"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|