Re: how to generate RSA format data?

2010-02-03 Thread Dr. Stephen Henson
On Tue, Feb 02, 2010, hunter li wrote: Hi, All, I have the following code to generate the RSA data. But it always gives me error: 5049:error:0906D064:lib(9):func(109):reason(100):pem_lib.c:756. I do appreciate any suggestion! First suggestion is don't post user questions to the dev

Re: how to generate RSA format data?

2010-02-03 Thread hunter li
Hi, Steve, thank you very much! How can I add newlines into the base64 data. sincerely, Hunter On Wed, Feb 3, 2010 at 9:35 AM, Dr. Stephen Henson st...@openssl.orgwrote: On Tue, Feb 02, 2010, hunter li wrote: Hi, All, I have the following code to generate the RSA data. But it always gives

Re: how to generate RSA format data?

2010-02-03 Thread hunter li
Hi, Shahin, Thank you very much! I will try to find the algorithm identifier and an exponent. I just read raw data from DVD disk to verify the DVD data. I try to use rsa_public_decrypt or rsa_verify. Both of them need to use a RSA* format data. For now I only have the above raw data as public

how to generate RSA format data?

2010-02-02 Thread hunter li
Hi, All, I have the following code to generate the RSA data. But it always gives me error: 5049:error:0906D064:lib(9):func(109):reason(100):pem_lib.c:756. I do appreciate any suggestion! #include stdio.h #include stdlib.h #include stdint.h #include string.h #include openssl/bio.h #include

Re: how to generate RSA format data?

2010-02-02 Thread Shahin Khorasani
Hello hunter, Your raw data seems to be a RSA public key modulus. A public key in ASN.1 must have an algorithm identifier and an exponent. Take a look at this sample: raw data is (hexdump): 8230 2201 0d30 0906 862a 8648 0df7 0101 0501 0300 0182 000f 8230 0a01 8202 0101 d200 808c f87b cf63