Hi Mark, > I think I need to pull some data out of the header in the openssl DER file > and put it into the key BLOB (BLOBHEADER/RSAPUBKEY) structure in Windows. When you pluck the various ASN Integers out of the DER encoded key file, the integers have to be baked a bit before inserting into the BLOB. For some reason, Microsoft uses little endian format on some of the byte arrays in the BLOB (while ASN Integer's byte array ('content octets') are big endian).
I also seem to recall issues when providing a byte array from an ASN integer: ASN integers are two's compliment, so a 0x00 octet is prepended to the content octets if the high bit if octet[0] is set to ensure the data is positive. But some Microsoft component did not like it - the prepended octect caused the length of the array to change from 128 bytes to 129 bytes. Jeff On Fri, Jul 2, 2010 at 10:51 AM, Mark Bishop <m...@bish.net> wrote: > I am trying to take a DER formatted public key and putting the key into the > Window's Crypt library so that my Windows machine can send my linux machine > encrypted data. > > Trying to compile openssl for Windows is not on the table right now. I am > being forced to use the Windows Crypt library. > > Does anyone have some information that might be able to get me on my way? I > am not a security (openssl) specialist, but I am learning rapidly. > > I think I need to pull some data out of the header in the openssl DER file > and put it into the key BLOB (BLOBHEADER/RSAPUBKEY) structure in Windows. > > Right now, when I encrypt the same data on Windows and Linux, the Windows > one is 148 bytes and the Linux one is 128 bytes - the input data file is 16 > bytes. I am doing something very wrong. > > If there is any hope for me, please let me know. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org