# generate RSA public key having public modulus and exponent [closed]

i want to generate an RSA public public key file using openssl (or other tools) having public modulus and exponent, so i can use it later to encrypt files

i have this:

the modulus:

"BEB90F8AF5D8A7C7DA8CA74AC43E1EE8A48E6860C0D46A5D690BEA082E3A74E1"
+"571F2C58E94EE339862A49A811A31BB4A48F41B3BCDFD054C3443BB610B5418B"
+"3CBAFAE7936E1BE2AFD2E0DF865A6E59C2B8DF1E8D5702567D0A9650CB07A43D"
+"E39020969DF0997FCA587D9A8AE4627CF18477EC06765DF3AA8FB459DD4C9AF3"

the exponent: 0x10001


so how can i generate the public key from those, so i can use it to encrypt some data, or maybe there's a way to use these directly for encryption ?

## closed as unclear what you're asking by Gilles, otus, yyyyyyy, Maarten Bodewes♦, Henrick HellströmOct 1 '15 at 21:35

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• That is great you want to do that! What is your question? What have you tried? – mikeazo Sep 29 '15 at 12:09
• i couldn't find anything, apparently i can do the inverse; getting the modulus and exponent form a public key – Issam Führer Sep 29 '15 at 12:40
• What format is everything in right now? – mikeazo Sep 29 '15 at 12:54
• When I need to do the same, I use a python module. Here you'll find the doc: dlitz.net/software/pycrypto/api/current/… You just need two integers (modulus and public exponent), then you export it with the RSA.export('PEM') function. (Give a look to the examples) – ddddavidee Sep 29 '15 at 13:12
• thx that would help – Issam Führer Sep 29 '15 at 16:54

e = 0x10001