Re: How to encrypt data with given key and IV
- From: "Mitch Gallant" <jensigner@xxxxxxxxxxxxxxxx>
- Date: Thu, 17 May 2007 14:57:24 -0400
Here is a short note on comparing CryptoAPI, .NET and Java implementations
of symmetric encryption:
http://www.jensign.com/JavaScience/dotnet/NetDESEncrypt
- Mitch
"lelteto" <lelteto@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BD68A849-6A9C-4D62-98A3-BEEB273A3FC9@xxxxxxxxxxxxxxxx
You need to import the keys. You can use CryptImportKey with
PLAINTEXTKEYBLOB
- or if that's not supported, use the "exponent one" method (somewhere it
is
in MS KB) which creates an RSA public / private keypair with exponent = 1
and
use that to import the key blob (pretending it is encrypted with this
exponent one key).
As for the IV you can use CryptSetKeyParam(KP_IV)
Laszlo Elteto
SafeNet, Inc.
"Qinsheng Lai" wrote:
My project is on a VC++ with the original CAPI (no .NET/CNG ). I need to
do
triple DES or RC2 encryption/decryption with given key and IV stored in
byte[]. I had some experience with Java JCE, and these were straight
operations. However, to my suprise, after days of searching and reading,
still not get the hints to do it in MS CAPI. Seems MS CAPI only allow
symmetric key cipher base on password (password - hash - key ).
Any idea or suggestion from anybody? Thanks in advance.
.
- Prev by Date: Re: Importing a x509 certificate with only a public key
- Next by Date: Re: Certificate from thumprint
- Previous by thread: "LsaLogonUser" method to log a user on to the local computer using Kerberos ticket
- Next by thread: Re: Certificate from thumprint
- Index(es):
Relevant Pages
|
|