{"id":36531948,"url":"https://github.com/jedda/ecies","last_synced_at":"2026-01-12T03:02:07.224Z","repository":{"id":232328692,"uuid":"784039362","full_name":"jedda/ECIES","owner":"jedda","description":"A Go module to implement the ECIES encryption scheme with various keys. Compatible with Apple's Security framework implementation \u0026 the Secure Enclave on Apple platforms.","archived":false,"fork":false,"pushed_at":"2024-04-10T02:07:47.000Z","size":37,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-01T08:46:03.850Z","etag":null,"topics":["apple","ecies","go","security"],"latest_commit_sha":null,"homepage":"","language":"Go","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/jedda.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":"2024-04-09T04:12:37.000Z","updated_at":"2025-04-03T06:44:02.000Z","dependencies_parsed_at":"2024-06-19T14:43:37.773Z","dependency_job_id":null,"html_url":"https://github.com/jedda/ECIES","commit_stats":null,"previous_names":["jedda/ecies"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jedda/ECIES","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedda%2FECIES","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedda%2FECIES/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedda%2FECIES/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedda%2FECIES/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedda","download_url":"https://codeload.github.com/jedda/ECIES/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedda%2FECIES/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28332842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"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":["apple","ecies","go","security"],"created_at":"2026-01-12T03:02:07.159Z","updated_at":"2026-01-12T03:02:07.210Z","avatar_url":"https://github.com/jedda.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ECIES\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/jedda/ecies.svg)](https://pkg.go.dev/github.com/jedda/ecies)\n\nThis package and Go module implements the functions required to encrypt and decrypt data using the Elliptic Curve Integrated Encryption Scheme with X9.63 Key Derivation, and specifically; Apple's [implementation as part of Security.framework](https://developer.apple.com/documentation/security/1643957-seckeycreateencrypteddata) on iOS \u0026 macOS.\n\nIt was conceived to simplify the process of exchanging secure encrypted data cross-platform between a Go application and Apple devices. It has been designed to be capable of exchanging encrypted data using keys [protected by the Secure Enclave on Apple platforms](https://developer.apple.com/documentation/security/certificate_key_and_trust_services/keys/protecting_keys_with_the_secure_enclave) (with NIST P-256 elliptic curve keys) as well as other curves supported by ecdh.Curve (P-384, P-521, X25519).\n\nThis package [includes an implementation](https://github.com/jedda/ecies/blob/main/ecies.go#L154) of the [X9.63-KDF](https://datatracker.ietf.org/doc/html/rfc8418#section-2.1) Key Derivation Function used by Apple's framework to derive shared AES keys and an optional IV/nonce for GCM.\n\n### EC \u0026 AES Key Sizes\n\nThis package follows Apple's behaviour when it comes to AES key size selection. For \u003c=256 bit EC keys, 16 bits of the derived key are used for AES, leading to AES-128 being used for the symmetric encryption. Where EC key sizes \u003e256 bits are used (384, 521), 32 bits of the derived key are used for AES, resulting in AES-256 symmetric encryption.\n\n### Ciphertext Format\n\nCiphertext is outputted and expected in the following format (to match that outputted and expected by [`SecKeyCreateEncryptedData`](https://developer.apple.com/documentation/security/1643957-seckeycreateencrypteddata) and [`SecKeyCreateDecryptedData`](https://developer.apple.com/documentation/security/1644043-seckeycreatedecrypteddata)):\n\n``[ephemeral public key (raw bytes)] + [message ciphertext] + [AES-GCM authentication tag]``\n\n### Example Usage\n\nExample code showing how to encrypt and decrypt is [available here](https://github.com/jedda/ecies-example).\n\n### Companion Swift Playground\n\nA [companion Swift Playground project exists here](https://github.com/jedda/ecies-swift-playground) with instructions and examples of how to encrypt and decrypt data compatible with this package.\n\n### Unit Tests\n\nA series of unit tests are included to test the fundamentals as well as some concrete encrypt and decrypt operations. The test `TestExternalDecryptSuccess` includes test data encrypted by Security.framework on macOS with detailed examples as to configuration and algorithm choice.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedda%2Fecies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedda%2Fecies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedda%2Fecies/lists"}