{"id":19901948,"url":"https://github.com/hyperledger-iroha/iroha-ed25519","last_synced_at":"2025-05-02T23:32:10.150Z","repository":{"id":27244512,"uuid":"111099996","full_name":"hyperledger-iroha/iroha-ed25519","owner":"hyperledger-iroha","description":"RFC8032 compatible Ed25519 implementation with pluggable hash (sha2-512, sha3-512)","archived":false,"fork":false,"pushed_at":"2024-10-31T17:55:47.000Z","size":1279,"stargazers_count":31,"open_issues_count":0,"forks_count":13,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-07T08:37:10.692Z","etag":null,"topics":["amd64-64-24k","ed25519","fips140-2","fips202","flexible","linux","mac","openssl","osx","ref10","rfc8032","sha2","sha3","sha512"],"latest_commit_sha":null,"homepage":"https://wiki.hyperledger.org/display/iroha","language":"Assembly","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/hyperledger-iroha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-17T12:15:47.000Z","updated_at":"2024-12-07T13:45:09.000Z","dependencies_parsed_at":"2024-11-12T20:16:40.639Z","dependency_job_id":"4fc03f79-0e05-4229-9b27-19b6cac4c7fc","html_url":"https://github.com/hyperledger-iroha/iroha-ed25519","commit_stats":null,"previous_names":["hyperledger-iroha/iroha-ed25519"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperledger-iroha%2Firoha-ed25519","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperledger-iroha%2Firoha-ed25519/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperledger-iroha%2Firoha-ed25519/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperledger-iroha%2Firoha-ed25519/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperledger-iroha","download_url":"https://codeload.github.com/hyperledger-iroha/iroha-ed25519/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252122322,"owners_count":21698305,"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":["amd64-64-24k","ed25519","fips140-2","fips202","flexible","linux","mac","openssl","osx","ref10","rfc8032","sha2","sha3","sha512"],"created_at":"2024-11-12T20:16:42.440Z","updated_at":"2025-05-02T23:32:07.618Z","avatar_url":"https://github.com/hyperledger-iroha.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://travis-ci.org/hyperledger/iroha-ed25519.svg?branch=master)](https://travis-ci.org/hyperledger/iroha-ed25519)\n[![codecov](https://codecov.io/gh/hyperledger/iroha-ed25519/branch/master/graph/badge.svg)](https://codecov.io/gh/hyperledger/iroha-ed25519)\n\n# Ed25519 digital signature algorithm\n\n\nEd25519 digital signature algorithm is described in [RFC8032](https://tools.ietf.org/html/rfc8032).\nThis repository aims to provide modularized implementation of this algorithm.\n\nOriginally Ed25519 consists of three *modules*:\n- digital signature algorithm itself\n- SHA512 hash function\n- random number generator, to generate keypairs\n\nThis repository offers at least two different C implementations for every module.\nEvery implementation is tested and can be replaced with other at link-time.\nNew implementations can be added as well.\n\nDuring CMake time, users are able to choose any of these implementations using cmake definitions:\n\n- `EDIMPL`\n    - `ref10` - portable C implementation.\n    - `amd64-64-24k-pic` - optimized C and ASM implementation, works only on Linux amd64. Has fixes in ASM files, to allow *position independent code* (`-fPIC`) builds.\n- `HASH`\n    - `sha2_openssl`\n    - `sha2_sphlib`\n    - `sha3_brainhub` - default\n- `RANDOM`\n    - `rand_openssl`\n    - `dev_urandom` - default\n    - `dev_random`\n    - `bcryptgen` (windows only)\n- `BUILD`\n    - `STATIC`\n    - `SHARED` - build ed25519 library as shared library (default)\n\n**Example**:\nWe want to build shared library with fast amd64 implementation, SHA3 and PRNG, which reads entropy from `/dev/urandom`:\n\n```bash\n$ cmake .. -DEDIMPL=amd64-64-24k-pic -DHASH=sha3_brainhub -DRANDOM=dev_urandom -DBUILD=SHARED                   bogdan@Bogdans-MacBook-Pro\n-- [hunter] Calculating Toolchain-SHA1\n-- [hunter] Calculating Config-SHA1\n-- [hunter] HUNTER_ROOT: /Users/bogdan/.hunter\n-- [hunter] [ Hunter-ID: 1c7aaff | Toolchain-ID: 9e23df5 | Config-ID: 997ea55 ]\n-- [hunter] GTEST_ROOT: /Users/bogdan/.hunter/_Base/1c7aaff/9e23df5/997ea55/Install (ver.: 1.8.0-hunter-p11)\n-- EDIMPL=amd64-64-24k-pic is selected (Ed25519 implementation)\n-- HASH=sha3_brainhub is selected (SHA implementation)\n-- RANDOM=dev_urandom is selected (RNG implementation)\n-- BUILD=SHARED is selected (library build type)\n-- [ed25519] Target RANDOM=bcryptgen is not supported on your platform\n-- Configuring done\n-- Generating done\n-- Build files have been written to: /Users/bogdan/tools/iroha-ed25519/build\n```\n\n**Note**: only those targets (including tests) will be built, which are specified in `EDIMPL`, `HASH`, `RANDOM` variables.\n\n# API\n\n- API for Ed25519 is defined at [ed25519.h](include/ed25519/ed25519/ed25519.h)\n- API for SHA512 is defined at [sha512.h](include/ed25519/ed25519/sha512.h)\n- API for RNG is defined at [randombytes.h](include/ed25519/ed25519/randombytes.h)\n\n# Modules\n\n## ed25519 digital signature algorithm\n\n- `ref10` - portable but relatively slow C implementation, originally copied from [supercop-20171020](http://bench.cr.yp.to/supercop.html).\nIts API was redesigned to separate signature data from the *signed message* content.\n- `amd64-64-24k-pic` - fast (4x ref10) but non-portable C and ASM implementation, only for AMD64.\n                       Copied from [supercop-20171020](http://bench.cr.yp.to/supercop.html).\n                       Adopted to be included as a module. Has Position Independent Code (`-fPIC`) fixes by @l4l.\n\n## SHA512 has function as a dependency of ed25519\n\n- `sha2_openssl` - implementation of FIPS 180-4 SHA2 512 hash function, which uses openssl underneath\n- `sha2_sphlib` - implementation of FIPS 180-4 SHA2 512 hash function, which was taken from [supercop-20190110](http://bench.cr.yp.to/supercop.html)\n- `sha3_brainhub` - implementation of FIPS 202 SHA3 512 hash function taken from [brainhub repository](https://github.com/brainhub/SHA3IUF).\nRepository consists of a single C file, which was adopted to be included in a project as a module.\n\n## PRNG implementation as a dependency of ed25519\n\nTo generate keypair ed25519 needs a source of randomness (entropy).\n\nThis repository offers 4 implementations:\n- `rand_openssl` uses RAND_bytes from openssl\n- `dev_urandom` reads entropy from `/dev/urandom`\n- `dev_random` reads entropy from `/dev/random` (blocking call, uses busy waiting when user asks for more entropy than device can offer)\n- `bcryptgen` reads entropy from windows preferred entropy source.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperledger-iroha%2Firoha-ed25519","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperledger-iroha%2Firoha-ed25519","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperledger-iroha%2Firoha-ed25519/lists"}