Crypto api problem with dual CPU machine

P

Peter de Vroomen

Hi,

I made two small programs. One program encrypts a string with RSA, using a
private RSA key (1024 bits). The other program decrypts the string using a
public key. So just some basic encryption and decryption.

I generated a key set using the crypto API and wrote them to a file as an
ASCII string (a PRIVATEKEYBLOB and a PUBLICKEYBLOB, unencrypted). The
encryption program reads the private key from such a file. But the
decryption program has the public key built in (as a string), so it doesn't
have to read it from a file. Binary to ASCII conversion and back works
correctly.

The programs work fine on all sorts of different machines. I can encrypt a
message on one machine and decrypt it on another. I have used different
processors and mainboards, allmost no problem.

Except that it doesn't seem to work on a dual-CPU machine I have :( (dusl
PIII 550's). It somehow doesn't want to decrypt a string made on a
single-processor machine (so it seems). Importing the key (CryptImportKey)
works fine, I get no error back. But CryptDecrypt returns an error 8009000D
(NTE_NO_KEY). While the same program can decrypt the messages fine on the
other machines, same encrypted message, same private key, same public key,
same program (I didn't recompile it, just copy it to the other machines).

When I use the encryption program on the dual PIII machine to encrypt a
message, it CAN decrypt it fine. So it can obviously read it's own encrypted
messages, just not messages encrypted on other machines.

I don't get it, do I have to do something extra on dual CPU machines?

Thanks in advance!

PeterV

P.S. The single CPU machines I tested on had P4's, P3's and AMD Athlon XP
processors. It doesn't seem to be related to processors.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top