question about OAEP
Dear all: I trace the RSA_test.c and found after RSADP but before RSA_padding_check_PKCS1_OAEP, the bytes of decipher text is always less than the module by 1. I try several my private/public/cipher pairs to do the decryption but each time the bytes of my decipher text before RSA_padding_check_PKCS1_OAEP will have the same size of module. And then I cannot unpad the de-cipher text. Does the error come from wrong byte ordering of ciphertext or do I miss something to check? Can I read the error direct from cipher text, something like check sum, etc? Appreciate your help, cckuo __ 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]
question about encryption
Dear All: I key in the n,e,d p,q, dmp1, dmq1 and iqmp in rsa_test.c to encrypt and decrypt a chosen text. And I use RSA_check_key to double check whether the keys are ok or not and it return the pass signal. But after padding, RSA_padding_add_PKCS1_OAEP or RSA_padding_add_PKCS1_type_2, I cannot pass the MONT_HELPER function. Does that mean the keys are wrong or I miss something to check in MONT_HELPER function? Appreciate your help, cckuo __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
question about PRIVATEKEYBLOB
Dear ssl friends: I intent to test whether the RSA-OAEP encrypt\decrypt functions in crypto/rsa/rsa_eay.c work well to decrypt a so called PRIVATEKEYBLOB structure passed by XP. Below I excerpt some part of it: 52 53 41 32 00 08 00 0001 00 01 00 ^^^ ^ ^^^ RSA2 :it's a private key key-length in bisexponent value 0x10001 Below is the combination of module, p, q , etc. 3b 9c b3 07 64 45 0c da d8 1f 8e 7d c0 e3 9c bd ca 9d 4b 03 fa cb 87 2f fe 93 ce ef c6 93 9e e1 d3 53 ae f4 c1 50 ab 6d b2 6e 41 c2 69 d1 80 e4 21 80 5c a2 ... I use crypto/rsa/rsa_test.c to do such simple testing and I copy each part of PRIVATEKEYBLOB to the proper element of RSA structure in key1, a static function call in that c file. I have a "Segmentation fault" while running BN_bin2bn function. And the content seems little endian and should I revert them by each DWORD as big endian? If I really need to do so, is there any help function in Openssl can do it for me? Appreciate your help in advance, cckuo __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]