{"id":28865520,"url":"https://github.com/busyloop/akero","last_synced_at":"2025-09-11T01:08:44.923Z","repository":{"id":6378175,"uuid":"7615692","full_name":"busyloop/akero","owner":"busyloop","description":"Easy peer-to-peer public key cryptography","archived":false,"fork":false,"pushed_at":"2018-12-02T17:38:08.000Z","size":316,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-28T01:06:52.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/busyloop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-15T00:29:41.000Z","updated_at":"2021-01-07T15:49:49.000Z","dependencies_parsed_at":"2022-09-16T02:12:21.438Z","dependency_job_id":null,"html_url":"https://github.com/busyloop/akero","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/busyloop/akero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fakero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fakero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fakero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fakero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/busyloop","download_url":"https://codeload.github.com/busyloop/akero/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fakero/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274557583,"owners_count":25307516,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-06-20T10:13:34.275Z","updated_at":"2025-09-11T01:08:44.913Z","avatar_url":"https://github.com/busyloop.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Akero [![Build Status](https://travis-ci.org/busyloop/akero.png?branch=master)](https://travis-ci.org/busyloop/akero) [![Gem Version](https://badge.fury.io/rb/akero.svg)](https://badge.fury.io/rb/akero)\n\nAkero ([ἄγγελος](http://en.wiktionary.org/wiki/%F0%90%80%80%F0%90%80%90%F0%90%80%AB), messenger) is an easy-to-use library for peer-to-peer [public key cryptography](http://en.wikipedia.org/wiki/Public-key_cryptography). It enables two or more endpoints to exchange encrypted and/or signed messages without requiring a pre-shared secret.\n\nUnder the hood Akero uses standard OpenSSL primitives. Each instance wraps a [RSA](http://en.wikipedia.org/wiki/RSA)-keypair, a corresponding [X.509 certificate](http://en.wikipedia.org/wiki/X.509) and exchanges self-signed messages ([PKCS#7](https://tools.ietf.org/html/rfc2315)) with other instances.\n\nAkero does not try to be a substitute for a fully featured [PKI](http://en.wikipedia.org/wiki/Public_key_infrastructure). It is meant to be used as a building block in scenarios where trust-relationships and keyrings can be managed externally, and where the complexity of traditional solutions (X.509 PKI, OpenPGP, custom RSA) yields no tangible benefits.\n\n## Features\n\n* Secure 1-to-n messaging (sign-only -or- sign-\u003eencrypt-\u003esign)\n* Low complexity; easy to use, understand and review (only 192 lines of code)\n* Transport agnostic; messages and certificates are self-contained and optionally ascii-armored (base64)\n* Built on standard OpenSSL primitives, no homegrown algorithms\n* [100%](http://busyloop.github.com/akero/coverage/) test coverage\n\n\n## Installation\n\n`gem install akero`\n\n\n## Usage (API)\n\n```ruby\nrequire 'akero'\n\n# Alice, Bob and Charlie are Akero instances\nalice = Akero.new\nbob = Akero.new\ncharlie = Akero.new\n\n# Inspect Alice's keypair fingerprint\nalice.id # =\u003e \"AK:12:34:56:...\"\n\n# Alice signs a message\nsigned_msg = alice.sign(\"Hello world!\")\n\n# Anyone can receive this message and extract\n# Alice's fingerprint and public key from it\nmsg = bob.receive(signed_msg)\nmsg.body # =\u003e \"Hello world!\"\nmsg.type # =\u003e :signed\nmsg.from # =\u003e \"AK:12:34:56:...\"\nmsg.from_pk # =\u003e \"(alice-public-key)\"\n\n# Bob encrypts a message for Alice\nbobs_msg = bob.encrypt(msg.from_pk, \"Hello Alice!\")\n\n# Alice can receive it...\nmsg = alice.receive(bobs_msg)\nmsg.body # =\u003e \"Hello Alice!\"\nmsg.type # =\u003e :encrypted\nmsg.from # =\u003e \"AK:ab:cd:ef:...\"\nmsg.from_pk # =\u003e \"(bob-public-key)\"\n\n# ...and Charlie can't\nmsg = charlie.receive(bobs_msg) # =\u003e Exception is raised\n\n# Alice encrypts a message for Bob and Charlie\nmsg = alice.encrypt([bob.public_key, charlie.public_key], \"Hello!\")\n\n# Save Alice to a file\nFile.open('/tmp/alice.akr', 'w') { |f| f.write(alice.private_key) }\n\n# And load her again\nnew_alice = Akero.load(File.read('/tmp/alice.akr'))\n\n# By default all messages are ascii armored.\n# In production Alice disables the armoring\n# for better performance.\nsigned_msg = alice.sign(\"Hello world!\", false)\nencrypted_msg = alice.encrypt(alice.public_key, \"Hello!\", false)\nputs alice.receive(encrypted_msg).body # =\u003e \"Hello!\"\n```\n\n## Usage (CLI)\n\n```bash\n$ akero id -i /tmp/alice.akr\nPrivate key not found. Generating a new 4096 bits RSA key and saving to /tmp/alice.akr ...\nAK:8B:33:5B:AB:4C:78:CA:5E:CC:F5:FE:D7:75:F2:A4:74:16:28:FB:C2\n\n$ akero id -i /tmp/bob.akr\nPrivate key not found. Generating a new 4096 bits RSA key and saving to /tmp/bob.akr ...\nAK:CF:B3:4C:BA:7C:9C:2E:31:2D:0D:1D:3F:F9:F4:05:F6:C7:B2:38:3F\n\n$ akero pk -i /tmp/bob.akr \u003e/tmp/bob.pk\n\n$ echo \"Hello\" | akero encrypt -i /tmp/alice.akr /tmp/bob.pk | akero receive -i /tmp/bob.akr\nHello\n```\n\n## Documentation\n\n* [API Docs](http://busyloop.github.com/akero/doc/frames.html)\n* [Spec](https://github.com/busyloop/akero/blob/master/spec/akero_spec.rb)\n\n## Benchmarks\n\n![Throughput](https://github.com/busyloop/akero/raw/master/benchmark/bm_rate.png?raw=true)\n![Message size](https://github.com/busyloop/akero/raw/master/benchmark/bm_size.png?raw=true)\n\nThe above charts were generated using MRI 1.9.3p362 (x86_64-linux) on an [AMD Turion II Neo N40L](http://www.cpubenchmark.net/cpu.php?cpu=AMD+Turion+II+Neo+N40L+Dual-Core) CPU.\nYou may run the benchmarks on your own machine with `rake benchmark`.\n\n## License (MIT)\n\nCopyright (c) 2012 moe@busyloop.net\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusyloop%2Fakero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbusyloop%2Fakero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusyloop%2Fakero/lists"}