{"id":22670192,"url":"https://github.com/calccrypto/openpgp","last_synced_at":"2025-04-12T11:52:05.818Z","repository":{"id":10315875,"uuid":"12442617","full_name":"calccrypto/OpenPGP","owner":"calccrypto","description":"A C++ Implementation of RFC 4880","archived":false,"fork":false,"pushed_at":"2019-09-22T08:13:30.000Z","size":27226,"stargazers_count":114,"open_issues_count":0,"forks_count":34,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-03-26T06:34:36.583Z","etag":null,"topics":["c-plus-plus","cryptography","cryptography-library","openpgp","pgp","pgpdump","rfc"],"latest_commit_sha":null,"homepage":"","language":"C++","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/calccrypto.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":"2013-08-28T19:28:59.000Z","updated_at":"2025-03-07T15:18:48.000Z","dependencies_parsed_at":"2022-08-30T19:10:45.927Z","dependency_job_id":null,"html_url":"https://github.com/calccrypto/OpenPGP","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/calccrypto%2FOpenPGP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calccrypto%2FOpenPGP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calccrypto%2FOpenPGP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calccrypto%2FOpenPGP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calccrypto","download_url":"https://codeload.github.com/calccrypto/OpenPGP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565013,"owners_count":21125413,"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":["c-plus-plus","cryptography","cryptography-library","openpgp","pgp","pgpdump","rfc"],"created_at":"2024-12-09T15:52:37.856Z","updated_at":"2025-04-12T11:52:05.791Z","avatar_url":"https://github.com/calccrypto.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenPGP in C++\n\n[![Build Status](https://travis-ci.org/calccrypto/OpenPGP.svg?branch=master)](https://travis-ci.org/calccrypto/OpenPGP)\n[![Coverage Status](https://coveralls.io/repos/github/calccrypto/OpenPGP/badge.svg)](https://coveralls.io/github/calccrypto/OpenPGP)\n\nCopyright (c) 2013 - 2019 Jason Lee @ calccrypto at gmail.com\n\nPlease see [LICENSE](LICENSE) file for the license.\n\nAlso:\n - contrib/cmake/FindGMP.cmake is by Jack Poulson from [Elemental](https://github.com/elemental/Elemental) and is licened under the BSD License. It was changed slightly to remove a debug message.\n - Some of CMakeLists.txt was taken from the [Kitware CMake wiki RPath handling page](https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling#always-full-rpath).\n - The code for incorporating Google Test into CMake was taken from the [Google Test README](https://github.com/google/googletest/blob/master/googletest/README.md), and modified slightly.\n\n### With much help from\n\n- Alex Stapleton (OpenPGP-SDK)\n- Auston Sterling - Massive amounts of debugging and programming help\n- D-o-c - Key merging and elliptic curve parsing\n- GeorgeKalovyrnas - Got me to rewrite S2K3::run that solves 2 problems at once ([#44](https://github.com/calccrypto/OpenPGP/issues/44))\n- Herbert Hanewinkel (hanewin.net)\n- Jon Callas (RFC 4880)\n- kaie - Found lots of bugs that were caused by knowledge gaps ([#43](https://github.com/calccrypto/OpenPGP/issues/43))\n- Many people on the StackExchange network\n- mugwort-rc - Tons of testing code, code style updates, and bugfixes\n- pgpdump.net\n- PortablePGP\n\n## IMPORTANT\n\n**This library was not written for actual use.**\n\n**Rather, it was meant for learning about the**\n**internals of PGP can easily use/add a few**\n**`std::cout`s to see the internal workings.**\n\n**So if you choose to use it in a real setting**\n**where secrecy is required, do so at your own**\n**risk.**\n\n--------------------------------------------------------------------------------\n\nThis is a C++ implementation of the majority of RFC 4880,\nthe OpenPGP Message Format.\n\nThe purpose of this library is to help clear up the mess that\nis RFC 4880. It is extremely vague at best, and it took me\na long time to figure out most of it. No one should have to go\nthrough that.\n\nThis library allows for the modification of PGP packets, such\nas providing incorrect checksums and public key values. That\nwas done on purpose. I used it to test keys I created with\nknown working values. What others do with this capability\nis none of my concern or responsibility.\n\n--------------------------------------------------------------------------------\n\n## Building\n\n### Tools\n- A C++ compiler with C++11 support\n- CMake 3.6+\n\n### Libraries\n- GMP (\u003chttps://gmplib.org/\u003e)\n- bzip2 (\u003chttp://www.bzip.org/\u003e)\n- zlib (\u003chttp://www.zlib.net/\u003e)\n- OpenSSL (\u003chttps://www.openssl.org/\u003e) (optional)\n\n### Build\n```bash\nmkdir build\ncd build\ncmake ..\nmake\n\u003cmake test\u003e\nmake install\n```\n\n#### CMake Configuration Options\n\nThe boolean `GPG_COMPATIBLE` flag can be used to make this library gpg compatible\nwhen gpg does not follow the standard. By default this is set to False.\n\nThe boolean `USE_OPENSSL` flag can be used to replace the hashing and\nrandom number generation code with OpenSSL implementations. `USE_OPENSSL_HASH`\nand `USE_OPENSSL_RNG` can be used to independently replace the hashing or the\nrandom number generator. If OpenSSL is not found, CMake will default back to\nthe original implementation. All three are disabled by default.\n\n## Usage\n\nThis library should be relatively straightforward to use: Simply `#include \"OpenPGP.h\"`.\n\nIf you do not wish to include everything at once, `#include` whatever functions are needed:\n\n Feature        | Header         | Namespace\n----------------|----------------|------------------\n key generation | keygen.h       | OpenPGP::KeyGen\n key revocation | revoke.h       | OpenPGP::Revoke\n encrypt        | encrypt.h      | OpenPGP::Encrypt\n decrypt        | decrypt.h      | OpenPGP::Decrypt\n sign           | sign.h         | OpenPGP::Sign\n verify         | verify.h       | OpenPGP::Verify\n\nMultiple classes inherit from the abstract base class `PGP` in order\nto make differentiating PGP block types better in code:\n\n PGP block type        | Description\n-----------------------|-------------------------------------\n DetachedSignature     | detached signatures for files\n Key                   | base class for OpenPGP key types\n PublicKey             | holds public keys; inherits Key\n SecretKey             | holds private keys; inherits Key\n Message               | holds OpenPGP Messages\n RevocationCertificate | holds revocation certificates\n\nAll these different types are able to read in any PGP data, but\nwill cause problems when used. The `meaningful` function in these\nPGP objects is provided to make sure that the packet sequence\ncontained is meaningful.\n\n`CleartextSignature` does not inherit from PGP and cannot\nread non-Cleartext Signature data.\n\nAll data structures have some standard functions:\n\nFunction | Description\n---------|------------------------------------------\n   read  | reads data without the header information\n   show  | displays the data in human readable form like the way pgpdump.net does it.\n   raw   | returns a string of packet data without the header information\n   write | returns a string of the entire data, including the header.\n   clone | returns a pointer to a deep copy of the object (mainly used for moving PGP data around).\n   Ptr   | a typedef for std::shared_ptr\u0026lt;T\u0026gt; for the class where the typedef is found.\n\n`operator=` and the copy constructor have been overloaded\nfor the data structures that need deep copy.\n\n### Command Line Interface\nThe `cli/main.cpp` file provides a simple command line tool that\nuses modules from the `cli/modules` directory to provide functionality.\nThese can be used as examples on how to use the functions. A lot\nof the output was based on/inspired by pgpdump.net and GPG.\n\nNote: Keyrings were not implemented. Rather, individual keys are\nread from the directory used as arguments to functions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalccrypto%2Fopenpgp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalccrypto%2Fopenpgp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalccrypto%2Fopenpgp/lists"}