IES implementation following ECIES-KEM specification in ISO 18033-2.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (https://www.openssl.org/).
Add this line to your application's Gemfile:
gem 'openssl-pkey-ec-ies'
And then execute:
$ bundle
Or install it yourself as:
$ gem install openssl-pkey-ec-ies
Prepare secret key using OpenSSL.
openssl ecparam -genkey -out ec_key.pem -name prime192v1
ec = OpenSSL::PKey::EC::IES.new(test_key, "placeholder")
source = 'my secret'
cryptogram = ec.public_encrypt(source) # => cryptogram in string
result = ec.private_decrypt(cryptogram) # => 'my secret'
- Fork it ( https://github.com/webpay/openssl-pkey-ec-ies/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request