{"id":19684141,"url":"https://github.com/cedarcode/openssl-signature_algorithm","last_synced_at":"2025-04-29T05:32:06.855Z","repository":{"id":38381533,"uuid":"236827426","full_name":"cedarcode/openssl-signature_algorithm","owner":"cedarcode","description":"ECDSA, EdDSA, RSA-PSS and RSA-PKCS#1 signature algorithms for ruby","archived":false,"fork":false,"pushed_at":"2025-02-26T13:44:03.000Z","size":119,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-26T00:46:54.889Z","etag":null,"topics":["ecdsa","eddsa","gem","library","openssl","pss","rsa-pkcs1","ruby","signature-verification","signing","verify"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/openssl-signature_algorithm","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cedarcode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-28T19:54:36.000Z","updated_at":"2025-02-26T13:44:06.000Z","dependencies_parsed_at":"2024-06-18T23:57:15.588Z","dependency_job_id":"b4f4f6a5-61c5-4d3a-bc15-bae6e6ae2e3f","html_url":"https://github.com/cedarcode/openssl-signature_algorithm","commit_stats":{"total_commits":69,"total_committers":5,"mean_commits":13.8,"dds":0.2028985507246377,"last_synced_commit":"323447bf039c769462b25c89d0df0e9e10dcc5a0"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedarcode%2Fopenssl-signature_algorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedarcode%2Fopenssl-signature_algorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedarcode%2Fopenssl-signature_algorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedarcode%2Fopenssl-signature_algorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cedarcode","download_url":"https://codeload.github.com/cedarcode/openssl-signature_algorithm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251444691,"owners_count":21590556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecdsa","eddsa","gem","library","openssl","pss","rsa-pkcs1","ruby","signature-verification","signing","verify"],"created_at":"2024-11-11T18:16:56.121Z","updated_at":"2025-04-29T05:32:06.555Z","avatar_url":"https://github.com/cedarcode.png","language":"Ruby","readme":"# OpenSSL::SignatureAlgorithm\n\n\u003e ECDSA, EdDSA, RSA-PSS and RSA-PKCS#1 signature algorithms for ruby\n\nSign and verify using signature algorithm wrappers, instead of key objects.\n\nProvides `OpenSSL::SignatureAlgorithm::ECDSA`, `OpenSSL::SignatureAlgorithm::EdDSA`, `OpenSSL::SignatureAlgorithm::RSAPSS`\nand `OpenSSL::SignatureAlgorithm::RSAPKCS1` ruby object wrappers on top of `OpenSSL::PKey::EC`\nand `OpenSSL::PKey::RSA`, so that you can reason in terms of the algorithms and do less when\nsigning or verifying signatures.\n\nLoosely inspired by [rbnacl](https://github.com/RubyCrypto/rbnacl)'s [Digital Signatures](https://github.com/RubyCrypto/rbnacl/wiki/Digital-Signatures) interface.\n\n[![Gem](https://img.shields.io/gem/v/openssl-signature_algorithm.svg?style=flat-square\u0026color=informational)](https://rubygems.org/gems/openssl-signature_algorithm)\n[![Actions Build](https://github.com/cedarcode/openssl-signature_algorithm/workflows/build/badge.svg)](https://github.com/cedarcode/openssl-signature_algorithm/actions)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'openssl-signature_algorithm'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install openssl-signature_algorithm\n\n## Usage\n\n### ECDSA\n\n```ruby\nto_be_signed = \"to-be-signed\"\n\n# Signer\nalgorithm = OpenSSL::SignatureAlgorithm::ECDSA.new\nsigning_key = algorithm.generate_signing_key\nsignature = algorithm.sign(to_be_signed)\n\n# Signer sends verify key to Verifier\nverify_key_string = signing_key.verify_key.serialize\n\n# Verifier\nverify_key = OpenSSL::SignatureAlgorithm::ECDSA::VerifyKey.deserialize(verify_key_string)\nalgorithm = OpenSSL::SignatureAlgorithm::ECDSA.new\nalgorithm.verify_key = verify_key\nalgorithm.verify(signature, to_be_signed)\n```\n\n### EdDSA\n\nRequires adding the `ed25519` gem to your `Gemfile`\n\n```ruby\nrequire \"openssl/signature_algorithm/eddsa\"\n\nto_be_signed = \"to-be-signed\"\n\n# Signer\nalgorithm = OpenSSL::SignatureAlgorithm::EdDSA.new\nsigning_key = algorithm.generate_signing_key\nsignature = algorithm.sign(to_be_signed)\n\n# Signer sends verify key to Verifier\nverify_key_string = signing_key.verify_key.serialize\n\n# Verifier\nverify_key = OpenSSL::SignatureAlgorithm::EdDSA::VerifyKey.deserialize(verify_key_string)\nalgorithm = OpenSSL::SignatureAlgorithm::EdDSA.new\nalgorithm.verify_key = verify_key\nalgorithm.verify(signature, to_be_signed)\n```\n\n### RSA-PSS\n\n```ruby\nto_be_signed = \"to-be-signed\"\n\n# Signer\nalgorithm = OpenSSL::SignatureAlgorithm::RSAPSS.new\nsigning_key = algorithm.generate_signing_key\nsignature = algorithm.sign(to_be_signed)\n\n# Signer sends verify key to Verifier\nverify_key_string = signing_key.verify_key.serialize\n\n# Verifier\nverify_key = OpenSSL::SignatureAlgorithm::RSAPSS::VerifyKey.deserialize(verify_key_string)\nalgorithm = OpenSSL::SignatureAlgorithm::RSAPSS.new\nalgorithm.verify_key = verify_key\nalgorithm.verify(signature, to_be_signed)\n```\n\n### RSA-PKCS1_v1.5\n\n```ruby\nto_be_signed = \"to-be-signed\"\n\n# Signer\nalgorithm = OpenSSL::SignatureAlgorithm::RSAPKCS1.new\nsigning_key = algorithm.generate_signing_key\nsignature = algorithm.sign(to_be_signed)\n\n# Signer sends verify key to Verifier\nverify_key_string = signing_key.verify_key.serialize\n\n# Verifier\nverify_key = OpenSSL::SignatureAlgorithm::RSAPKCS1::VerifyKey.deserialize(verify_key_string)\nalgorithm = OpenSSL::SignatureAlgorithm::RSAPKCS1.new\nalgorithm.verify_key = verify_key\nalgorithm.verify(signature, to_be_signed)\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/cedarcode/openssl-signature_algorithm.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedarcode%2Fopenssl-signature_algorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcedarcode%2Fopenssl-signature_algorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedarcode%2Fopenssl-signature_algorithm/lists"}