{"id":17193689,"url":"https://github.com/andrei-markeev/resty.eddsa","last_synced_at":"2025-07-02T08:03:31.582Z","repository":{"id":83676794,"uuid":"553105950","full_name":"andrei-markeev/resty.eddsa","owner":"andrei-markeev","description":"Signing with Ed25519 algorithm in Openresty","archived":false,"fork":false,"pushed_at":"2022-10-18T15:43:31.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-30T06:41:34.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrei-markeev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-10-17T18:14:59.000Z","updated_at":"2022-10-18T15:37:11.000Z","dependencies_parsed_at":"2023-03-12T19:17:58.925Z","dependency_job_id":null,"html_url":"https://github.com/andrei-markeev/resty.eddsa","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/andrei-markeev%2Fresty.eddsa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-markeev%2Fresty.eddsa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-markeev%2Fresty.eddsa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-markeev%2Fresty.eddsa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrei-markeev","download_url":"https://codeload.github.com/andrei-markeev/resty.eddsa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245415162,"owners_count":20611497,"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":[],"created_at":"2024-10-15T01:44:44.495Z","updated_at":"2025-03-25T07:21:58.105Z","avatar_url":"https://github.com/andrei-markeev.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Signing with Ed25519 algorithm in Openresty\n\nThis module provides FFI interface to create signatures using EdDSA Ed25519 algorithm. It uses openssl to do the signing. Openresty's `ngx_http_lua_ffi_decode_base64` function is used for decoding private key from base64.\n\n### How to use\n\nCopy file `lib/resty/signEd25519.lua` to the `resty` folder under `lualib`, e.g. `/usr/local/openresty/site/lualib/resty`.\n\nUse in your code like this:\n\n```lua\nlocal eddsa = require(\"resty.eddsa\")\n\n-- private key in base64\nlocal keyInBase64 = \"123456789+abcdefghijklmnopqrstuvwxyz+123450=\"\n\neddsa.signEd25519(keyInBase64, \"message to sign\")\n```\n\n**NB!** The key should be in RAW format, so e.g. if you have a PEM file (you can generate one using command `openssl genpkey -algorithm ed25519 -outform PEM -out private_key.pem`), you would need to do something like this:\n\n```console\n$ openssl pkey -in private_key.pem -noout -text | sed 1,2d | tr -d '\\n\\r :' | xxd -r -p | base64\n```\n\n### TypescriptToLua users:\n\nInstall from NPM:\n\n```bash\nnpm i resty.eddsa\n```\n\nThen use from TS like this:\n\n```ts\nimport {signEd25519} from \"resty.eddsa\"\n\nsignEd25519(privateKeyInBase64, \"message to sign\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrei-markeev%2Fresty.eddsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrei-markeev%2Fresty.eddsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrei-markeev%2Fresty.eddsa/lists"}