RE: Crypto API and Not W2K problem
- From: "Frank Perry" <FrankPerry@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 25 Jun 2005 04:38:01 -0700
I may have found the problem. I thought it was related to the OS difference.
I now think it was a case of misusing the exchange key. I haven't been able
to test it yet but I think I have the answer.
I was encrypting the session key blob with my own exchange key and trying.
Then sending the PUBLICKEYBLOB to the other side to decrypt the the session
key blob. I think that the SIMPLEBLOB only encrypts with the public key from
the exchange key and only decrypts with the private key. As I wasn't sending
the private key the SIMPLEBLOB couldn't be decrypted.
Does that sound right?
--
Frank Perry
LavaLeaf Software
"Frank Perry" wrote:
> I'm trying to send data between Pocket PCs and W2K and not having any success.
>
> I need to exchange keys between the two. I have programs on both platforms
> that creates key blobs. When I copy them from one platform to another, they
> fail. The basic operation on both sides is:
> CryptAcquireContext
> CryptGenKey for the the exchange key
> CryptGenKey for the session key
> CryptExportKey for both - this is for testing. The real program will not
> send both keys
> Write the keys to a file
> Use the session key to encrypt the data
> Write the data to the file.
>
> The other end:
> Reads the exchange key blob
> Reads the session key blob
> CryptImportKey the exchange key
> CryptImportKey the session key
> Here it fails. I get a NTE_BAD_KEY error when I try it from one OS to the
> other. The program continues and decrypts the data correctly on the same OS.
>
>
> Any ideas? It's driving me batty. I'm using the Crypto API built in to
> both. Is there a difference that the documentation doesn't mention about the
> algorithyms they use?
>
> Any thoughts will be appreciated.
>
>
> --
> Frank Perry
> LavaLeaf Software
.
- References:
- Crypto API and W2K problem
- From: Frank Perry
- Crypto API and W2K problem
- Prev by Date: Re: Any good example how to make a setup project for ActiveSync?
- Next by Date: CanGoBackChanged-Event doesn't work
- Previous by thread: Crypto API and W2K problem
- Next by thread: MAC Address of Pocket PC
- Index(es):
Relevant Pages
|