> 2. In RSA_test.c, the key1 has the n as > "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F" > "\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5" > "\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x0C\x70\xFB\x68\x76\x93" > "\x9C\xE6\x16\xCE\x62\x4A\x11\xE0\x08\x6D\x34\x1E\xBC\xAC\xA0\xA1" > "\xF5" > What does the first "\x00" mean? If the order of n is order A, defined in > the question 1, it seems useless. If the order of n is order B, > BN_num_bytes > tells me the # of bytes is 64, but it should be 65.
If the leading zero weren't there, the high bit would be set, which would make the number negative. Leading zero bytes must be omitted if they have no significance but cannot be omitted when they change the value. The DER standard requires that the number be represented in the fewest number of bytes possible. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]