0.0
No commit activity in last 3 years
No release in over 3 years
Write a longer description or delete this line.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
>= 0
>= 0
~> 10.0
~> 3.0

Runtime

~> 0.2.0
 Project Readme

CryptoGost¶ ↑

<img src=“https://travis-ci.org/WildDima/crypto_gost.svg?branch=master” alt=“Build Status” />

Ruby library implementing GOST 34.10-12 ECC (not production ready)

Installation¶ ↑

Add this line to your application’s Gemfile:

gem 'crypto_gost'

And then execute:

$ bundle

Or install it yourself as:

$ gem install crypto_gost

Usage¶ ↑

group = CryptoGost::Group::Nistp192
private_key = group.generate_private_key
public_key = group.generate_public_key private_key
message = 'ruby'

signature = CryptoGost::Create.new(message, group).(private_key) #=> #<CryptoGost::Signature:0x007fbf1a128e38 @r=797072555870978995277638382002810748614228757069663574432, @s=3005972168119503640451023541340174801109033211348956501476>

# signature = CryptoGost::Create.new(message, group).call(private_key)

CryptoGost::Verify.new(message, group).(public_key, signature) # => true

# CryptoGost::Verify.new(message, group).call(public_key, signature)

List of added elliptic curves:

Nistp192
Nistp224
Nistp256
Nistp384
Nistp521
Secp112r1
Secp112r2
Secp128r1
Secp128r2
Secp160k1
Secp160r1
Secp160r2
Secp192k1
Secp192r1
Secp224k1
Secp224r1
Secp256k1
Secp256r1
Secp384r1
Secp521r1

Contributing¶ ↑

Bug reports and pull requests are welcome on GitHub at github.com/wilddima/crypto_gost. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.

License¶ ↑

The gem is available as open source under the terms of the [MIT License](opensource.org/licenses/MIT).