JKJS
RSA_print_fp(stdout,rsa,1);
this function adds 0x00 in modulus . So public key size becomes 129 bytes instead of 128 bytes.
Why 0x00 is added?
Thank You.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The modulus is an integer, not a string of bytes. An integer can be both negative and positive. Although negative integers are not used for the modulus in RSA, the functions that handle integers are generic in OpenSSL.
A negative number has its most significant bit set to 1. To distinguish between a negative integer and a positive integer that happens to have bit 7 of the most significant byte set to 1, the positive integer is prefixed with 0x00.