{"id":21322179,"url":"https://github.com/bakaoh/solidity-dkim","last_synced_at":"2025-07-12T05:30:54.920Z","repository":{"id":36019853,"uuid":"220728005","full_name":"bakaoh/solidity-dkim","owner":"bakaoh","description":"Verify DomainKeys Identified Mail signatures","archived":false,"fork":false,"pushed_at":"2023-01-24T00:45:27.000Z","size":673,"stargazers_count":10,"open_issues_count":8,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T14:36:42.370Z","etag":null,"topics":["dkim","solidity"],"latest_commit_sha":null,"homepage":null,"language":"Solidity","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/bakaoh.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":null,"support":null}},"created_at":"2019-11-10T01:51:41.000Z","updated_at":"2024-12-24T13:09:25.000Z","dependencies_parsed_at":"2023-02-13T06:25:11.691Z","dependency_job_id":null,"html_url":"https://github.com/bakaoh/solidity-dkim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bakaoh/solidity-dkim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakaoh%2Fsolidity-dkim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakaoh%2Fsolidity-dkim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakaoh%2Fsolidity-dkim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakaoh%2Fsolidity-dkim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bakaoh","download_url":"https://codeload.github.com/bakaoh/solidity-dkim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakaoh%2Fsolidity-dkim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264941579,"owners_count":23686517,"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":["dkim","solidity"],"created_at":"2024-11-21T20:14:04.193Z","updated_at":"2025-07-12T05:30:54.619Z","avatar_url":"https://github.com/bakaoh.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solidity DKIM\n\nA Solidity library to verify [DKIM signatures](https://tools.ietf.org/html/rfc6376):\n\n- Support `rsa-sha1` and `rsa-sha256` signature algorithms\n- Implement both canonicalization algorithms (`simple`, `relaxed`)\n- Support the signature schemes by Gmail, Yahoo, ProtonMail, Outlook\n- Gas cost under 3 million gas\n\nThe contract receive raw email as input and return number of success verifications along with the last success domain or the last fail status (if there's no success).\n\n## Getting Started\n\nClone and install dependencies\n\n```\n$ git clone https://github.com/bakaoh/solidity-dkim\n$ cd solidity-dkim\n$ npm install\n```\n\nStart [ganache](https://www.trufflesuite.com/docs/ganache/quickstart)\n\nDownload email from your inbox\n\n![download](/Screenshot.png)\n\nTest with raw email\n\n```\n$ RAW_EMAIL=\u003cpath to your email file\u003e npm run test\n# example\n$ RAW_EMAIL=test/data/gmail-raw.txt npm run test\n```\n\n## 3rd party Smart Contracts\n\n- [https://github.com/Arachnid/solidity-stringutils](https://github.com/Arachnid/solidity-stringutils)\n- [https://github.com/ensdomains/buffer](https://github.com/ensdomains/buffer)\n- [https://github.com/ensdomains/solsha1](https://github.com/ensdomains/solsha1)\n\n## Troubleshoot\n\n**no header boundary found**: The raw email must be in \"network normal\" format (text is ASCII encoded, lines are separated with CRLF characters, etc.). The downloaded files should work just fine, but if you copy the email content to your text editor, you may need to replace `\\n` with `\\r\\n`, e.g. `input = input.replace(new RegExp(\"\\n\", 'g'), \"\\r\\n\")`\n\n**dns query error**: The library is using hardcode `_domainkey` records and your email domain is not in the current list. In the future, we'll need a proper oracle that can read the `_domainkey` record for any arbitrary domain.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakaoh%2Fsolidity-dkim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbakaoh%2Fsolidity-dkim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakaoh%2Fsolidity-dkim/lists"}