LIBRNP(3)
π LIBRNP π (that's the librnp page from section 3, bestie)
okay so picture this: you wanna do OpenPGP stuff in your own code, not just in the terminal. that's librnp. she's the library. she's the blueprint. she's the moment. π
β¨ NAME β¨
librnp β OpenPGP implementation, available via FFI interface.
β¨ SYNOPSIS β¨
#include <rnp/rnp.h>
#include <rnp/rnp_err.h>
β¨ DESCRIPTION β¨
so librnp is part of the RNP suite (iykyk) and she's literally the foundation under rnp(1) and rnpkeys(1), those command-line utilities you've probably already met. main character supporting cast energy, honestly. π
what she gives you is an FFI interface to the functions you need for the operations the OpenPGP protocol requires. no cap.
you get at all of that through two headers: <rnp/rnp.h> and <rnp/rnp_err.h>. and yeah, you're also gonna need to link against librnp. can't skip that step, bestie, that's the whole point. π
and likeβ¦ go read the headers?? for real?? that's where the full function list lives and where the detailed documentation is. we're not gonna retype the entire API here, that would be unhinged. π
π§ EXAMPLES π§
there are a bunch of example files chilling in the src/examples folder of the RNP suite source tree. they're giving "study the source, become the source." πΈ
generate.cβ shows you how to generate an OpenPGP keypair using the JSON key description mechanism. lowkey the cool part: you can use it to generate any custom key types that the RNP suite supports.encrypt.cβ demonstrates how to build OpenPGP-encrypted messages. the message gets encrypted with keys generated via./generate, and there's a hardcoded password in there. iconic, simple, works.decrypt.cβ demonstrates how to decrypt OpenPGP messages. heads up though: to run this one you gotta run the./encryptexample first, because that's what produces the sample encrypted message you're decrypting. order matters, babe. β¨sign.cβ demonstrates how to sign OpenPGP messages. and again with the prerequisites: run the./generateexample first so the secret keys actually exist and get written out.verify.cβ demonstrates verify OpenPGP signed messages (yes that's the original phrasing, she contains multitudes). once more: run the./signexample first, because that's what generates the signed OpenPGP message you're verifying.
ngl the whole examples folder is a pipeline. generate β encrypt β decrypt, generate β sign β verify. run em in order or they'll just be sad and empty. π₯Ί
π BUGS π
found something broken? please report issues via the RNP public issue tracker at: https://github.com/rnpgp/rnp/issues.
and if it's a security report or security-sensitive feedback β like, actual danger vibes β those go through the instructions at: https://www.rnpgp.org/feedback. don't put those in the public tracker, bestie, that's not the vibe. π₯
π AUTHORS π
RNP is an open source project led by Ribose, and it has received contributions from numerous individuals and organizations. group project but everyone actually showed up. slay. π«Ά
β RESOURCES β
- web site:
https://www.rnpgp.org - source repository:
https://github.com/rnpgp/rnp
π COPYING π
Copyright (C) 2017-2021 Ribose. The RNP software suite is freely licensed: please refer to the LICENSE file for details.
like, actually go read the LICENSE file. it's right there. it's free and it's detailed. π
πΈ SEE ALSO πΈ
π¦ AUTHOR π¦
RNP
and that's the whole page, bestie!! π this was RNP version 0.18.1, dated 2026-06-12, living in the RNP Manual, section 3, LIBRNP(3) β go forth and link against her, she's literally so good. β¨π
π¦ where this page comes from
- ubuntu stonking: librnp-dev 0.18.1-1.1build1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms