# Re: question about public key encryption

**URL:** <https://www.ruby-forum.com/t/re-question-about-public-key-encryption/111343>\
**Category:** Ruby\
**Created:** [August 6, 2007, 11:43am UTC](https://www.ruby-forum.com/t/re-question-about-public-key-encryption/111343 "2007-08-06T11:43:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stickstone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Post date:** [August 6, 2007, 11:43am UTC](https://www.ruby-forum.com/t/re-question-about-public-key-encryption/111343/1 "2007-08-06T11:43:40Z")

</div>

> 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?

You could try reading the answers which were given to you before. e.g.  
[http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/263202?263040-263463+split-mode-vertical](http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/263202?263040-263463+split-mode-vertical)
