write_tag_1_packet(9)
π NAME π
okay so write_tag_1_packet(9) β straight out of the Kernel API Manual β is the function that writes an RFC2440-compatible tag 1 (public key) packet. yes bestie, a whole packet. iconic π
β¨ SYNOPSIS β¨
int write_tag_1_packet (char *dest , size_t *remaining_bytes , struct key *auth_tok_key , struct ecryptfs_auth_tok *auth_tok , struct ecryptfs_crypt_stat *crypt_stat , struct ecryptfs_key_record *key_rec , size_t *packet_size );
π ARGUMENTS π
destβ the buffer into which to write the packet. put the packet here, bestie π«Άremaining_bytesβ maximum number of bytes that can be writtn. (yes, that's the spelling on the page, no cap π) so it's the max bytes situation.auth_tok_keyβ the authentication token key to unlock and put when done withauth_tok. unlock it, then put it when you're done withauth_tok, periodt πauth_tokβ the authentication token used for generating the tag 1 packet. it's the token doing the tag 1 packet generation β¨crypt_statβ the cryptographic context. the crypto context, iykyk π₯key_recβ the key record struct for the tag 1 packet. the struct holding the key record for the tag 1 packet πpacket_sizeβ this function will write the number of bytes that end up constituting the packet; set to zero on error. so on the way out it writes how many bytes actually make up the packet, and if there's an error it's set to zero π
π¦ DESCRIPTION π¦
okay so the whole return situation is: returns zero on success; non-zero on error. that's the vibe check, bestie β¨
π SEE ALSO π
- Kernel file
./fs/ecryptfs/keystore.c ecryptfs_parse_packet_length(9)ecryptfs_write_packet_length(9)ecryptfs_verify_version(9)ecryptfs_verify_auth_tok_from_key(9)ecryptfs_find_auth_tok_for_sig(9)ecryptfs_parse_tag_70_packet(9)decrypt_pki_encrypted_session_key(9)parse_tag_1_packet(9)parse_tag_3_packet(9)parse_tag_11_packet(9)decrypt_passphrase_encrypted_session_key(9)ecryptfs_parse_packet_set(9)write_tag_11_packet(9)write_tag_3_packet(9)ecryptfs_generate_key_packet_set(9)
mwah π source/version: ./fs/ecryptfs; date: October 2026; page: write_tag_1_packet(9). bye bestie, go write that packet! π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms