{"id":20367176,"url":"https://github.com/rubycrypto/ed25519","last_synced_at":"2025-05-16T15:07:28.216Z","repository":{"id":4866197,"uuid":"6021085","full_name":"RubyCrypto/ed25519","owner":"RubyCrypto","description":"Ed25519 high-performance public-key signature system as a RubyGem (MRI C extension and JRuby Java extension)","archived":false,"fork":false,"pushed_at":"2025-05-04T01:51:53.000Z","size":1059,"stargazers_count":109,"open_issues_count":1,"forks_count":18,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-11T12:37:53.680Z","etag":null,"topics":["cryptography","curve25519","digital-signatures","ed25519","elliptic-curves"],"latest_commit_sha":null,"homepage":"https://ed25519.cr.yp.to/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"edeustace/json-processor","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubyCrypto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2012-09-30T18:40:17.000Z","updated_at":"2025-05-10T00:41:43.000Z","dependencies_parsed_at":"2023-12-02T02:08:45.720Z","dependency_job_id":"62868a30-2dba-4faa-9f8d-9050e1eb3c52","html_url":"https://github.com/RubyCrypto/ed25519","commit_stats":{"total_commits":111,"total_committers":7,"mean_commits":"15.857142857142858","dds":0.5405405405405406,"last_synced_commit":"4ab46633c684576e56c8282e6235eca8bc833a32"},"previous_names":["tarcieri/red25519","crypto-rb/ed25519"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyCrypto%2Fed25519","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyCrypto%2Fed25519/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyCrypto%2Fed25519/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyCrypto%2Fed25519/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyCrypto","download_url":"https://codeload.github.com/RubyCrypto/ed25519/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254553958,"owners_count":22090417,"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":["cryptography","curve25519","digital-signatures","ed25519","elliptic-curves"],"created_at":"2024-11-15T00:29:30.390Z","updated_at":"2025-05-16T15:07:28.210Z","avatar_url":"https://github.com/RubyCrypto.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ed25519.rb [![Latest Version][gem-shield]][gem-link] [![Yard Docs][docs-image]][docs-link] [![License: MIT][license-image]][license-link] [![CI Status][ci-image]][ci-link] \n\n[gem-shield]: https://img.shields.io/gem/v/ed25519?logo=ruby\n[gem-link]: https://rubygems.org/gems/ed25519\n[ci-image]: https://github.com/RubyCrypto/ed25519/workflows/CI/badge.svg\n[ci-link]: https://github.com/RubyCrypto/ed25519/actions?query=workflow%3ACI+branch%3Amaster\n[docs-image]: https://img.shields.io/badge/yard-docs-blue.svg\n[docs-link]: http://www.rubydoc.info/gems/ed25519/1.4.0\n[license-image]: https://img.shields.io/badge/license-MIT-blue.svg\n[license-link]: https://github.com/RubyCrypto/ed25519/blob/master/LICENSE\n\nA Ruby binding to the Ed25519 elliptic curve public-key signature system\ndescribed in [RFC 8032].\n\nTwo implementations are provided: a MRI C extension which uses the \"ref10\"\nimplementation from the SUPERCOP benchmark suite, and a pure Java version\nbased on [str4d/ed25519-java].\n\nEd25519 is one of two notable algorithms implemented atop the Curve25519\nelliptic curve. The [x25519 gem] is a related project of this one,\nand implements the X25519 Diffie-Hellman key exchange algorithm on the\nMontgomery form of Curve25519.\n\n[RFC 8032]: https://tools.ietf.org/html/rfc8032\n[str4d/ed25519-java]: https://github.com/str4d/ed25519-java\n[x25519 gem]: https://github.com/RubyCrypto/x25519\n\n## What is Ed25519?\n\nEd25519 is a modern implementation of a [Schnorr signature] system using\nelliptic curve groups.\n\nEd25519 provides a 128-bit security level, that is to say, all known attacks\ntake at least 2^128 operations, providing the same security level as AES-128,\nNIST P-256, and RSA-3072.\n\n![Ed25519 Diagram](https://raw.githubusercontent.com/RubyCrypto/ed25519/master/ed25519.png)\n\nEd25519 has a number of unique properties that make it one of the best-in-class\ndigital signature algorithms:\n\n* ***Small keys***: Ed25519 keys are only 256-bits (32 bytes), making them\n  small enough to easily copy around. Ed25519 also allows the public key\n  to be derived from the private key, meaning that it doesn't need to be\n  included in a serialized private key in cases you want both.\n* ***Small signatures***: Ed25519 signatures are only 512-bits (64 bytes),\n  one of the smallest signature sizes available.\n* ***Deterministic***: Unlike (EC)DSA, Ed25519 does not rely on an entropy\n  source when signing messages. This can be a potential attack vector if\n  the entropy source is not generating good random numbers. Ed25519 avoids\n  this problem entirely and will always generate the same signature for the\n  same data.\n* ***Collision Resistant***: Hash-function collisions do not break this\n  system. This adds a layer of defense against the possibility of weakness\n  in the selected hash function.\n\nYou can read more on [Dan Bernstein's Ed25519 site](http://ed25519.cr.yp.to/).\n\n[Schnorr signature]: https://en.wikipedia.org/wiki/Schnorr_signature\n\n### Is it any good?\n\n[Yes.](http://news.ycombinator.com/item?id=3067434)\n\n## Help and Discussion\n\nHave questions? Want to suggest a feature or change? Join a discussion group:\n\n* [Crypto.rb Gitter]: web-based chat about Ruby crypto projects including **ed25519**.\n* [Crypto.rb Google Group]: join via web or email ([crypto-rb+subscribe@googlegroups.com])\n\n[Crypto.rb Gitter]: https://gitter.im/crypto-rb/Lobby\n[Crypto.rb Google Group]: https://groups.google.com/forum/#!forum/crypto-rb\n[crypto-rb+subscribe@googlegroups.com]: mailto:crypto-rb+subscribe@googlegroups.com?subject=subscribe\n\n## Requirements\n\n**ed25519.rb** is supported on and tested against the following platforms:\n\n- MRI 3.0, 3.1, 3.2, 3.3, 3.4\n- JRuby 9.4.12, 10.0.0\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'ed25519'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install ed25519\n\n# Usage\n\nRequire **ed25519.rb** in your Ruby program:\n\n```ruby\nrequire \"ed25519\"\n```\n\nGenerate a new random signing key:\n\n```ruby\nsigning_key = Ed25519::SigningKey.generate\n```\n\nSign a message with the signing key:\n\n```ruby\nsignature = signing_key.sign(message)\n```\n\nObtain the verify key for a given signing key:\n\n```ruby\nverify_key = signing_key.verify_key\n```\n\nCheck the validity of a signature:\n\n```ruby\nverify_key.verify(signature, message)\n```\n\nThe verify method will return `true` if the signature verifies, or raise\n`Ed25519::VerifyError` if verification fails.\n\n### Serializing Keys\n\nKeys can be serialized as 32-byte binary strings as follows:\n\n```ruby\nsignature_key_bytes = signing_key.to_bytes\nverify_key_bytes = verify_key.to_bytes\n```\n\nThe binary serialization can be passed directly into the constructor for a given key type:\n\n```ruby\nsigning_key = Ed25519::SigningKey.new(signature_key_bytes)\nverify_key  = Ed25519::VerifyKey.new(verify_key_bytes)\n```\n\n## Security Notes\n\nThe Ed25519 \"ref10\" implementation from SUPERCOP was lovingly crafted by expert\nsecurity boffins with great care taken to prevent timing attacks. The same\ncannot be said for the C code used in the **ed25519.rb** C extension or in the\nentirety of the provided Java implementation.\n\nCare should be taken to avoid leaking to the attacker how long it takes to\ngenerate keys or sign messages (at least until **ed25519.rb** itself can be audited\nby experts who can fix any potential timing vulnerabilities)\n\n**ed25519.rb** relies on a strong `SecureRandom` for key generation.\nWeaknesses in the random number source can potentially result in insecure keys.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/RubyCrypto/ed25519.\nThis project is intended to be a safe, welcoming space for collaboration,\nand contributors areexpected to adhere to the [Contributor Covenant](http://contributor-covenant.org)\ncode of conduct.\n\n## License\n\nCopyright (c) 2012-2025 Tony Arcieri. Distributed under the MIT License. See\n[LICENSE] for further details.\n\n[LICENSE]: https://github.com/RubyCrypto/ed25519/blob/master/LICENSE\n\n## Code of Conduct\n\nEveryone interacting in the **ed25519.rb** project’s codebases, issue trackers, chat\nrooms and mailing lists is expected to follow the [code of conduct].\n\n[code of conduct]: https://github.com/RubyCrypto/ed25519/blob/master/CODE_OF_CONDUCT.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubycrypto%2Fed25519","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubycrypto%2Fed25519","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubycrypto%2Fed25519/lists"}