# Question about public key encryption

**URL:** <https://www.ruby-forum.com/t/question-about-public-key-encryption/111314>\
**Category:** Ruby\
**Created:** [August 5, 2007, 8:45pm UTC](https://www.ruby-forum.com/t/question-about-public-key-encryption/111314 "2007-08-05T20:45:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubyer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/13edae/32.png) [@rubyer](https://www.ruby-forum.com/u/rubyer)\
**Post date:** [August 5, 2007, 8:45pm UTC](https://www.ruby-forum.com/t/question-about-public-key-encryption/111314/1 "2007-08-05T20:45:31Z")

</div>

hello all,

does anyone have the experience about public key encryption with ruby? I  
know how to use the module OpenSSL::PKey::RSA to create public/private  
key pair and encrypt/decrypt with the key pair. however, if I only know  
other guy’s public key, is there any module or method to encrypt data  
with the guy’s public key?

thanks a lot.
