/home/abui.../aes_xts.h(3)
π NAME
ok so bestie, this is the manual page for /home/abuild/rpmbuild/BUILD/libzpc-legacy-1.5.0-build/libzpc-1.5.0/include/zpc/aes_xts.h β the AES-XTS API β¨ (yes, it's the Library Functions Manual page for /home/abui.../aes_xts.h(3), we been knew). It's the header where all the AES-XTS goodness lives, and I'm about to walk you through every single function in it fr fr π«Ά
β¨ SYNOPSIS β the functions, bestie π
int zpc_aes_xts_alloc (struct zpc_aes_xts **ctx)
int zpc_aes_xts_set_key (struct zpc_aes_xts *ctx, struct zpc_aes_key
*key1, struct zpc_aes_key *key2)
int zpc_aes_xts_set_iv (struct zpc_aes_xts *ctx, const unsigned char
*iv)
int zpc_aes_xts_get_intermediate_iv (struct zpc_aes_xts *ctx, unsigned
char iv[16])
int zpc_aes_xts_set_intermediate_iv (struct zpc_aes_xts *ctx, const
unsigned char iv[16])
int zpc_aes_xts_encrypt (struct zpc_aes_xts *ctx, unsigned char *ct,
const unsigned char *pt, size_t ptlen)
int zpc_aes_xts_decrypt (struct zpc_aes_xts *ctx, unsigned char *pt,
const unsigned char *ct, size_t ctlen)
void zpc_aes_xts_free (struct zpc_aes_xts **ctx)
Like, that's the whole cast. Every function, no cap, nothing left out π
π¦ Detailed Description
Bestie. AES-XTS API. That's the vibe.
This is the encryption API for the Advanced Encryption Standard (AES) block cipher [1] in XEX-based Tweaked-codebook mode with ciphertext Stealing (XTS) mode of operation [9]. Say that three times fast, I dare you π It's giving "I read the spec and I understood it" main character energy.
Definition in file aes_xts.h.
π Function Documentation
β int zpc_aes_xts_alloc (struct zpc_aes_xts ** ctx)
Ok so this one allocates a brand new context for an AES-XTS operation. Fresh start, new beginnings, the glow-up begins here π
Parameters
ctxβ AES-XTS context
Returns
0on success. Otherwise, a non-zero error code is returned. (iykyk, check your return values bestie π€)
β int zpc_aes_xts_set_key (struct zpc_aes_xts * ctx, struct zpc_aes_key * key1, struct zpc_aes_key * key2)
Sets the key to be used in the context of an AES-XTS operation. And not just one key β two keys, because XTS is extra like that π₯
Parameters
ctxβ AES-XTS contextkey1β first AES keykey2β second AES key
Returns
0on success. Otherwise, a non-zero error code is returned.
β int zpc_aes_xts_set_iv (struct zpc_aes_xts * ctx, const unsigned char * iv)
Sets the initialization vector to be used in the context of an AES-XTS operation. You know, the IV. The lil sparkle that makes everything unpredictable β¨
Parameters
ctxβ AES-XTS contextivβ 16 byte initialization vector
Returns
0on success. Otherwise, a non-zero error code is returned.
β int zpc_aes_xts_get_intermediate_iv (struct zpc_aes_xts * ctx, unsigned char iv[16])
Gets the intermediate initialization vector to be used in the context of an AES-XTS operation. "Intermediate" like, mid-journey. It's giving character development arc π
Parameters
ctxβ AES-XTS contextivβ application provided buffer with 16 bytes size to receive the 16 byte intermediate iv
Returns
0on success. Otherwise, a non-zero error code is returned.
β int zpc_aes_xts_set_intermediate_iv (struct zpc_aes_xts * ctx, const unsigned char iv[16])
Sets the intermediate initialization vector to be used in the context of an AES-XTS operation.
β οΈ Heads up bestie: an initial iv must be set before via zpc_aes_xts_set_iv. Like, do that step FIRST, don't skip it π
Parameters
ctxβ AES-XTS contextivβ 16 byte intermediate iv
Returns
0on success. Otherwise, a non-zero error code is returned.
β int zpc_aes_xts_encrypt (struct zpc_aes_xts * ctx, unsigned char * ct, const unsigned char * pt, size_t ptlen)
Do an AES-XTS encryption operation. Your plaintext goes in, ciphertext comes out, nobody has to know ππ₯
Parameters
ctxβ AES-XTS contextctβ ciphertextptβ plaintextptlenβ plaintext length [bytes]
Returns
0on success. Otherwise, a non-zero error code is returned.
β int zpc_aes_xts_decrypt (struct zpc_aes_xts * ctx, unsigned char * pt, const unsigned char * ct, size_t ctlen)
Do an AES-XTS decryption operation. The reverse glow-up, we love a comeback story π
Parameters
ctxβ AES-XTS contextptβ plaintextctβ ciphertextctlenβ ciphertext length [bytes]
Returns
0on success. Otherwise, a non-zero error code is returned.
β void zpc_aes_xts_free (struct zpc_aes_xts ** ctx)
Frees an AES-XTS context. Clean up after yourself, bestie β no leaked memory in this house π§Ήβ¨
Parameters
ctxβ AES-XTS context
π Author
Generated automatically by Doxygen for libzpc from the source code. Not me writing fanfic about it, an actual robot did this one π€π
and that's the whole page!! π go forth and AES-XTS responsibly, bestie β mwah π
this cute lil rewrite was brought to you by libzpc Version 1.4 and the fine folks at /home/abui.../aes_xts.h(3) β slay, periodt π
π¦ where this page comes from
- opensuse-leap 16.0: libzpc-legacy-devel 1.5.0-160000.2.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms