Crypto API and W2K problem



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
.



Relevant Pages

  • RE: Crypto API and Not W2K problem
    ... I was encrypting the session key blob with my own exchange key and trying. ... The program continues and decrypts the data correctly on the same OS. ...
    (microsoft.public.pocketpc.developer)
  • Retrieve Public Key with CryptGetUserKey???
    ... I am currently creating a high level set of crypto functions based on the MS ... I have generated a Machine Container, an Exchange Key Pair (that will also ... Now I want to generate a session key and store it on the disk as a KEY BLOB. ... function) to get a handle to the Public Exchange Key and not the private ...
    (microsoft.public.security)
  • Retrieve Public Key with CryptGetUserKey???
    ... I am currently creating a high level set of crypto functions based on the MS ... I have generated a Machine Container, an Exchange Key Pair (that will also ... Now I want to generate a session key and store it on the disk as a KEY BLOB. ... function) to get a handle to the Public Exchange Key and not the private ...
    (microsoft.public.win2000.security)
  • Public Exchange key from cert
    ... I have got a test app that reads the recipient's public ... exchange key from a file and uses it to encrypt the ... session key. ...
    (microsoft.public.platformsdk.security)