# Question about public key encryption

**URL:** <https://rubytalk.org/t/question-about-public-key-encryption/39697>\
**Category:** ruby-talk\
**Created:** [6 August 2007 09:35 UTC](https://rubytalk.org/t/question-about-public-key-encryption/39697 "2007-08-06T09:35:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Candler](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Brian\_Candler](https://rubytalk.org/u/Brian_Candler)\
**Post date:** [6 August 2007 09:35 UTC](https://rubytalk.org/t/question-about-public-key-encryption/39697/1 "2007-08-06T09:35:04Z")

</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)
