Re: question about rsa_test.c
Hello, > I try to understand RSA-OAEP with rsa_test.c and I have some questions about > this file. > 1. If the number is 1234567893456 in dec, that is 11F71FB11D0 in hec, how > should I put it in the static unsigned char n[]? > Should I put is as "\x1\x1F\x71\xFB\x11\xD0", I marked this one as order A, > or "\xD0\x11\xFB\x71\x1F\x1", I marked it as order B? "\x01\x1F\x71\xFB\x11\xD0" > 3. How could I print the RSA_fail and RSA_erro strings? > I trace the procedure to the ERR_load_RSA_strings but I have no ideas how > to print it out of the standard output. If you mean OpenSSL errors: ERR_print_errors_fp(stderr); > 4. How could I print bn number out of the standard output? BN_print(). Best regards, -- Marek Marcola <[EMAIL PROTECTED]> __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
RE: question about rsa_test.c
> 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 Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
question about rsa_test.c
Dear all: I try to understand RSA-OAEP with rsa_test.c and I have some questions about this file. 1. If the number is 1234567893456 in dec, that is 11F71FB11D0 in hec, how should I put it in the static unsigned char n[]? Should I put is as "\x1\x1F\x71\xFB\x11\xD0", I marked this one as order A, or "\xD0\x11\xFB\x71\x1F\x1", I marked it as order B? 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. 3. How could I print the RSA_fail and RSA_erro strings? I trace the procedure to the ERR_load_RSA_strings but I have no ideas how to print it out of the standard output. 4. How could I print bn number out of the standard output? Appreciate your help, cckuo __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]