KRB5_RD_SAFE(3)

πŸ’– KRB5_RD_SAFE(3) β€” the krb5_rd_safe / krb5_rd_priv page πŸ’–

okay bestie, so this is the man page for krb5_rd_safe and krb5_rd_priv β€” they're the verifiers. the ones who check that your messages are actually real and not somebody being shady. πŸ’…


✨ NAME ✨

krb5_rd_safe, krb5_rd_priv β€” verifies authenticity of messages πŸ”


πŸ“š LIBRARY πŸ“š

Kerberos 5 Library (libkrb5, -lkrb5)


πŸŽ€ SYNOPSIS πŸŽ€

#include <krb5.h>

krb5_error_code
krb5_rd_priv(krb5_context context, krb5_auth_context auth_context,
    const krb5_data *inbuf, krb5_data *outbuf,
    krb5_replay_data *outdata);

krb5_error_code
krb5_rd_safe(krb5_context context, krb5_auth_context auth_context,
    const krb5_data *inbuf, krb5_data *outbuf,
    krb5_replay_data *outdata);

like. look at them. twins. πŸ‘―β€β™€οΈ


🌸 DESCRIPTION 🌸

so here's the vibe: krb5_rd_safe() and krb5_rd_priv() both parse KRB-SAFE and KRB-PRIV messages β€” the ones that got made by krb5_mk_safe(3) and krb5_mk_priv(3), bestie, you know the ones πŸ’– β€” and they pull those messages out of inbuf and then verify the message's integrity. like a vibe check but for cryptography. if it's fake, they will KNOW. πŸ”₯

the user data part of the message ends up in outbuf. that's the actual good stuff, the payload, the main character of the whole operation. πŸ‘‘

the encryption state β€” including the keyblocks and the addresses β€” gets taken from auth_context. it's all in there already, you don't have to hand it over again. 🫢

and THEN β€” this is the fun bit β€” if the KRB5_AUTH_CONTEXT_RET_SEQUENCE flag or the KRB5_AUTH_CONTEXT_RET_TIME flag is set in the auth_context, then the sequence number and the time come back to you in the outdata parameter. it's giving "yes and here's the receipts". 🧾✨

ngl, no return-value lore on this page β€” the synopsis literally says both functions hand you a krb5_error_code, so check that. no cap. 😭

πŸ‘€ SEE ALSO πŸ‘€

the whole little friend group. go read them, they're all part of the same era. πŸ¦‹


written by the lovely people at HEIMDAL, dated May 1, 2006 β€” a classic, honestly, an absolute icon of a timestamp, and it ate πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from