Re: TripleDESCryptoServiceProvider vs. CryptoAPI
From: Ivan Medvedev [MS] (ivanmed_at_online.microsoft.com)
Date: 07/29/03
- Next message: Ivan Medvedev [MS]: "Re: PKCS7 and PKCS5 PaddingMode in .NET Symmetric Ciphers"
- Previous message: borgc: "Re: System.Security.Principal.WindowsImpersonation"
- In reply to: Oleg Leikin: "Re: TripleDESCryptoServiceProvider vs. CryptoAPI"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 29 Jul 2003 08:27:10 -0700
Oleg -
Key material is a Key and an IV. Also, if you are using CryptDeriveKey in
the C++ code you should use
System.Security.Cryptography.PasswordDeriveBytes.CryptDeriveKey() method in
managed code to get the same functionality (in this case no reveral is
neccessary), otherwise you will not get the same key.
--Ivan
This posting is provided "AS IS" with no warranties, and confers no rights.
"Oleg Leikin" <loleg@optisign.net> wrote in message
news:072f01c35598$c79e34d0$a401280a@phx.gbl...
>
> >Also, because of the little-endian/big-endian difference,
> the byte order in
> >the key material must be reversed when passing from
> managed to Crypto API
> >and vice versa.
>
> Ivan,
> what should be reversed ? In .NET application I create
> some MD5 hash of some data to be a key. In the C++
> application I use CryptCreateHash(...,CALG_MD5,...) and
> CryptHashData() in order to create the key base object,
> and then CryptDeriveKey(...) in order to create the key
> itself.
>
> What "key material" must be reversed ?
>
> Thanks in advance.
>
> P.S. Now I've added CryptSetKeyParam(...) before
> CryptDeriveKey(...). Should I reverse the IV also ?
>
- Next message: Ivan Medvedev [MS]: "Re: PKCS7 and PKCS5 PaddingMode in .NET Symmetric Ciphers"
- Previous message: borgc: "Re: System.Security.Principal.WindowsImpersonation"
- In reply to: Oleg Leikin: "Re: TripleDESCryptoServiceProvider vs. CryptoAPI"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|