{"id":13611721,"url":"https://github.com/rpgp/rpgp","last_synced_at":"2025-05-13T18:12:51.644Z","repository":{"id":25209974,"uuid":"103457711","full_name":"rpgp/rpgp","owner":"rpgp","description":"OpenPGP implemented in pure Rust, permissively licensed","archived":false,"fork":false,"pushed_at":"2025-05-08T17:50:15.000Z","size":4346,"stargazers_count":874,"open_issues_count":59,"forks_count":85,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-05-08T18:40:48.097Z","etag":null,"topics":["cryptography","openpgp","pgp","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/pgp","language":"Rust","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/rpgp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","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,"zenodo":null}},"created_at":"2017-09-13T22:18:26.000Z","updated_at":"2025-05-06T11:37:43.000Z","dependencies_parsed_at":"2024-01-14T10:59:34.848Z","dependency_job_id":"dc1611cd-c8e5-434f-9102-80bb191424dd","html_url":"https://github.com/rpgp/rpgp","commit_stats":{"total_commits":368,"total_committers":28,"mean_commits":"13.142857142857142","dds":0.6304347826086957,"last_synced_commit":"951b8f9d9b2818fdce964581a08f0e636fd3ecf1"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpgp%2Frpgp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpgp%2Frpgp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpgp%2Frpgp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpgp%2Frpgp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rpgp","download_url":"https://codeload.github.com/rpgp/rpgp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000883,"owners_count":21997443,"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":["cryptography","openpgp","pgp","rust"],"created_at":"2024-08-01T19:02:01.470Z","updated_at":"2025-05-13T18:12:51.610Z","avatar_url":"https://github.com/rpgp.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# rPGP\n\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Crates version --\u003e\n  \u003ca href=\"https://crates.io/crates/pgp\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/pgp.svg?style=flat-square\"\n    alt=\"Crates.io version\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Downloads --\u003e\n  \u003ca href=\"https://crates.io/crates/pgp\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/d/pgp.svg?style=flat-square\"\n      alt=\"Download\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- docs.rs docs --\u003e\n  \u003ca href=\"https://docs.rs/pgp\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square\"\n      alt=\"docs.rs docs\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- msrv --\u003e\n  \u003ca href=\"https://img.shields.io/badge/rustc-1.85+-blue.svg?style=flat-square\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/rustc-1.85+-blue.svg?style=flat-square\"\n      alt=\"MSRV 1.85\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003e\n    \u003ca href=\"https://docs.rs/pgp\"\u003e\n      Rust Docs\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://github.com/rpgp/rpgp/releases\"\u003e\n      Releases\n    \u003c/a\u003e\n  \u003c/h3\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\n\u003e OpenPGP implemented in pure Rust, permissively licensed\n\nrPGP is a pure Rust implementation of OpenPGP.\n\nrPGP implements OpenPGP as specified in [RFC9580], including the commonly used v4 formats, as well as the latest v6 key formats and AEAD encryption mechanisms.\nAll formats specified in the historical RFCs [RFC4880] and [RFC6637], such as v3 keys and signatures, are supported as well.\n\n\nSee [`IMPL_STATUS.md`](docs/IMPL_STATUS.md) for more details on the implemented PGP features.\n\nrPGP offers a flexible low-level API and gives users the ability to build higher level PGP tooling in the most compatible way possible.\nAdditionally, it fully supports all functionality required by the [Autocrypt 1.1 e-mail encryption specification].\n\n## Usage\n\n```sh\n\u003e cargo add pgp\n```\n\n### Load a public key and verify an inline-signed message\n\n```rust no_run\nuse std::fs;\nuse pgp::composed::{SignedPublicKey, Message, Deserializable};\n\nlet pub_key_file = \"key.asc\";\nlet msg_file = \"msg.asc\";\n\nlet key_string = fs::read_to_string(pub_key_file).unwrap();\nlet (public_key, _headers_public) = SignedPublicKey::from_string(\u0026key_string).unwrap();\n\nlet msg_string = fs::read_to_string(msg_file).unwrap();\nlet (mut msg, _headers_msg) = Message::from_string(\u0026msg_string).unwrap();\n\n// Verify this message\n// NOTE: This assumes that the primary serves as the signing key, which is not always the case!\nmsg.verify(\u0026public_key).unwrap();\n\nlet msg_string = msg.as_data_string().unwrap(); // actual message content\nprintln!(\"Signed message: {:?}\", msg_string);\n```\n\n### Generate and verify a detached signature with an OpenPGP keypair\n\n```rust no_run\nuse std::fs;\nuse pgp::composed::{Deserializable, SignedPublicKey, SignedSecretKey};\nuse pgp::types::{Password, PublicKeyTrait, SecretKeyTrait};\nuse pgp::crypto::hash::HashAlgorithm;\n\nlet priv_key_file = \"key.sec.asc\";\nlet pub_key_file = \"key.asc\";\n\nlet data = b\"Hello world!\";\n\n// Create a new signature using the private key\nlet secret_key_string = fs::read_to_string(priv_key_file).expect(\"Failed to load secret key\");\nlet signed_secret_key = SignedSecretKey::from_string(\u0026secret_key_string).unwrap().0;\n\nlet new_signature = signed_secret_key.create_signature(\u0026Password::empty(), HashAlgorithm::default(), \u0026data[..]).unwrap();\n\n// Verify the signature using the public key\nlet key_string = fs::read_to_string(pub_key_file).expect(\"Failed to load public key\");\nlet public_key = SignedPublicKey::from_string(\u0026key_string).unwrap().0;\n\npublic_key.verify_signature(HashAlgorithm::default(), \u0026data[..], \u0026new_signature).unwrap();\n```\n\n## Current Status\n\n\u003e Last updated *September 2024*\n\n- Implementation Status: [IMPL_STATUS.md](docs/IMPL_STATUS.md)\n- Security Status: [STATUS_SECURITY.md](docs/SECURITY_STATUS.md)\n- Supported Platforms: [PLATFORMS.md](docs/PLATFORMS.md)\n\n## rPGP for application developers\n\nrPGP aims to make it easy for application developers to incorporate OpenPGP functionality into their projects.\n\nHowever, the OpenPGP format and its semantics are relatively complex, and there has historically not been a reader-friendly introduction to the domain.\n\nThe text [\"OpenPGP for application developers\"](https://openpgp.dev/) offers an introduction to OpenPGP, aimed mainly at application developers. We recommend it for initial orientation.\n\nIndependently, we welcome questions in the rPGP issue tracker.\n\n## Users \u0026 Libraries built using rPGP\n\n- [Delta Chat]: Cross-platform messaging app that works over e-mail\n- [`rpm`]: A pure rust library for parsing and creating RPM files\n- [`rpgpie`]: An experimental high level OpenPGP API\n- [`rsop`]: A SOP CLI tool based on rPGP and rpgpie\n- [`debian-packaging`]: a library crate for dealing with Debian packages\n\nDon't see your project here? Please send a PR :)\n\n### FAQs\n\nCheckout [FAQ.md](docs/FAQ.md).\n\n\n## Minimum Supported Rust Version (MSRV)\n\nAll crates in this repository support Rust 1.85 or higher. In future minimally supported\nversion of Rust can be changed, but it will be done with a minor version bump.\n\n## Funding\n\n[RFC 9580 support for rPGP](https://nlnet.nl/project/rPGP-cryptorefresh/)\nhas been funded in part through [NGI0 Core](https://nlnet.nl/core/),\na fund established by [NLnet](https://nlnet.nl)\nwith financial support from the European Commission's [Next Generation Internet](https://ngi.eu) programme.\n\n## License\n\nThis project is licensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or\n   \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or\n   \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this project by you, as defined in the Apache-2.0 license,\nshall be dual licensed as above, without any additional terms or conditions.\n\n[RFC2440]: https://tools.ietf.org/html/rfc2440\n[RFC4880]: https://tools.ietf.org/html/rfc4880.html\n[RFC6637]: https://www.rfc-editor.org/rfc/rfc6637\n[RFC9580]: https://www.rfc-editor.org/rfc/rfc9580.html\n[Autocrypt 1.1 e-mail encryption specification]: https://autocrypt.org/level1.html\n[the `pgp` Crate]: https://crates.io/crates/pgp/\n[Delta Chat]: https://delta.chat\n[`rsop`]: https://crates.io/crates/rsop/\n[`rpgpie`]: https://crates.io/crates/rpgpie\n[`rpm`]: https://crates.io/crates/rpm\n[`debian-packaging`]: https://crates.io/crates/debian-packaging\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpgp%2Frpgp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpgp%2Frpgp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpgp%2Frpgp/lists"}