{"id":16270800,"url":"https://github.com/fboulnois/ring-pkae-example","last_synced_at":"2025-07-01T10:34:39.020Z","repository":{"id":140693423,"uuid":"441357265","full_name":"fboulnois/ring-pkae-example","owner":"fboulnois","description":"An example of public key authenticated encryption in Rust","archived":false,"fork":false,"pushed_at":"2021-12-24T17:25:54.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-08T15:34:43.556Z","etag":null,"topics":["aead","crypto","cryptography","ecdh","elliptic-curve-cryptography","public-key-cryptography","public-key-encryption","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fboulnois.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-24T03:38:46.000Z","updated_at":"2022-10-06T01:47:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9355760-5f76-4566-a8c4-5646c0f057de","html_url":"https://github.com/fboulnois/ring-pkae-example","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fboulnois/ring-pkae-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fboulnois%2Fring-pkae-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fboulnois%2Fring-pkae-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fboulnois%2Fring-pkae-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fboulnois%2Fring-pkae-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fboulnois","download_url":"https://codeload.github.com/fboulnois/ring-pkae-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fboulnois%2Fring-pkae-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262944591,"owners_count":23388794,"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":["aead","crypto","cryptography","ecdh","elliptic-curve-cryptography","public-key-cryptography","public-key-encryption","rust"],"created_at":"2024-10-10T18:11:39.450Z","updated_at":"2025-07-01T10:34:39.001Z","avatar_url":"https://github.com/fboulnois.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Public key authenticated encryption in Rust\n\nThis is an example implementation of public key authenticated encryption (PKAE)\nin Rust using only the high performance [Ring](https://github.com/briansmith/ring)\ncryptography library.\n\nPKAE enables a person or service X to send confidential data to another person\nor service Y such that only Y can read the data. Y can also verify that the data\noriginated from X and not an impostor.\n\n## Motivation\n\nBoth the [libsodium](https://doc.libsodium.org/public-key_cryptography/authenticated_encryption)\nand [openssl](https://www.openssl.org/docs/manmaster/man7/evp.html) libraries\ncan perform PKAE using specific primitives, however these are easy to misuse and\ncall a lot of potentially unsafe C code. No such similar examples to perform\nPKAE exist for `ring`. Also, the Rust interfaces to libsodium and openssl\nrequire the full libraries which substantially increase code size. Finally, many\nRust crates already depend on `ring` directly or transitively, including\n`rustls` and by extension `actix-net`, `actix-web`, `tokio-rustls`,  `h2`, and\n`reqwest`. Writing PKAE functionality using `ring` avoids having to bring in a\nseparate dependency.\n\n## Documentation\n\nThe implementation is short and each function is documented, so the best\ndocumentation is the [code itself](src/main.rs). A browsable `rustdoc` version\ncan also be created using `cargo rustdoc -- --document-private-items`.\n\n## Building and running the code\n\nType `cargo run`. If the code encrypts and decrypts the message successfully, it\nshould print `Ok`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffboulnois%2Fring-pkae-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffboulnois%2Fring-pkae-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffboulnois%2Fring-pkae-example/lists"}