{"id":17115238,"url":"https://github.com/sundarnagarajan/py25519","last_synced_at":"2026-05-04T06:35:07.390Z","repository":{"id":62578407,"uuid":"54245592","full_name":"sundarnagarajan/py25519","owner":"sundarnagarajan","description":"Python wrappers around  Ed25519: high-speed high-security signatures by Daniel J. Bernstein","archived":false,"fork":false,"pushed_at":"2016-10-07T14:47:11.000Z","size":1251,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T08:42:53.970Z","etag":null,"topics":["curve25519","ed25519","python","python-wrapper"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sundarnagarajan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-GPLv3.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-19T03:34:02.000Z","updated_at":"2017-05-21T03:08:04.000Z","dependencies_parsed_at":"2022-11-03T21:01:33.326Z","dependency_job_id":null,"html_url":"https://github.com/sundarnagarajan/py25519","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sundarnagarajan%2Fpy25519","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sundarnagarajan%2Fpy25519/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sundarnagarajan%2Fpy25519/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sundarnagarajan%2Fpy25519/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sundarnagarajan","download_url":"https://codeload.github.com/sundarnagarajan/py25519/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186923,"owners_count":20574554,"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":["curve25519","ed25519","python","python-wrapper"],"created_at":"2024-10-14T17:22:29.936Z","updated_at":"2026-05-04T06:35:07.347Z","avatar_url":"https://github.com/sundarnagarajan.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py25519\nPython wrapper around curve25519 by mehdi sotoodeh.  The files under py25519/c  are from mehdi sotoodeh and are copied unchanged from https://github.com/msotoodeh/curve25519.\n\n# LICENSE\nThe files under py25519/c are licensed under the MIT LICENSE (see license.txt file under py25519/c).\n\nAll remaining files in this package are licensed under the GNU General Public License version 3 or (at your option) any later version.\n\nSee the file LICENSE-GPLv3.txt for details of the GNU General Public License version 3.\n\n\n# Class Documentation\n\n\n\tclass Key25519(__builtin__.object)\n\t\t  __init__(self, secretkey=None, verifyingkey=None, pubkey=None)\n\t\t    '''\n\t\t      secretkey--\u003ebytes[32]\n\t\t        verifyingkey--\u003ebytes[32]\n\t\t      pubkey--\u003ebytes[32]\n\n\t\t      A PublicKey version of the object will have ONLY verifyingkey\n\t\t      and pubkey and signingkey will be None\n\t\t      A PrivateKey version of the object will have secretkey set\n\t\t      and verifyingkey and pubkey are ignored and derived from secretkey\n\n\t\t      Storing and reusing the secretkey is a way to recreate your key pair\n\t\t    '''\n\n\t\t  get_ecdh_key(self, other)\n\t\t    '''\n\t\t      other--\u003eKey25519 instance\n\t\t    '''\n\n\t\t  public_key(self)\n\t\t    '''\n\t\t      Returns a PublicKey version of this object\n\t\t    '''\n\n\t\t  selftest(self)\n\t\t    '''\n\t\t      Returns--\u003eboolean\n\t\t    '''\n\n\t\t  serialize(self)\n\n\t\t  sign = wrapped(*args, **kwargs)\n\n\t\t  verify = wrapped(*args, **kwargs)\n\n\t\t  # ---------------------------------------------------------------------\n\t\t  # Properties (data descriptors)\n\t\t  # ---------------------------------------------------------------------\n\n\t\t  pubkey\n\n\t\t  secretkey\n\n\t\t  signingkey\n\n\t\t  verifyingkey\n\n# Simple test\nsee py25519.test.py\n\n\tfrom py25519 import Key25519\n\n\n\tc = Key25519()\n\tprint('secretkey: ', c.secretkey)\n\tprint('signingkey: ', c.signingkey)\n\tprint('verifyingkey: ', c.verifyingkey)\n\n\tmsg = 'Hello world'\n\tbadmsg = msg + '1'\n\tsig = c.sign(msg)\n\tbadsig = c.sign(badmsg)\n\tprint('good verify: ', c.verify(sig, msg))\n\tprint('badmsg verify: ', c.verify(sig, badmsg))\n\tprint('badsig verify: ', c.verify(badsig, msg))\n\n\td = Key25519(secretkey=c.secretkey)\n\tprint('----- d is a copy of c -----')\n\tprint('d.verify: ', d.verify(sig, msg))\n\tprint('c == d:', c == d)\n\tprint('public(c) == public(d):', c.public_key() == d.public_key())\n\tprint('c == public(d):', c == d.public_key())\n\n\tprint('----- e is a new different key -----')\n\te = Key25519()\n\tprint('e.verify: ', e.verify(sig, msg))\n\tprint('c == e:', c == e)\n\tprint('public(c) == public(e):', c.public_key() == e.public_key())\n\n\tprint('----- Test ECDH shared key -----')\n\tecdh1 = c.get_ecdh_key(e.public_key())\n\tecdh2 = e.get_ecdh_key(c.public_key())\n\tprint('ecdh equal: ', ecdh1 == ecdh2)\n\tecdh3 = e.get_ecdh_key(c.public_key())\n\tprint('ecdh equal again: ', ecdh1 == ecdh3)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsundarnagarajan%2Fpy25519","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsundarnagarajan%2Fpy25519","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsundarnagarajan%2Fpy25519/lists"}