AES_XTS_FULL.H(3)
π aes_xts_full.h β the AES-XTS-FULL API, bestie
Okay so this is a page from the Library Functions Manual, and it's all about the AES-XTS-FULL API. Strap in, because we're about to make cryptography cute. π
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/libzpc-legacy-1.5.0-build/libzpc-1.5.0/include/zpc/aes_xts_full.h β AES-XTS-FULL API. That's the whole vibe. It's a header file, it's iconic, it does exactly what it says on the tin. π
πΈ SYNOPSIS πΈ
Functions
int zpc_aes_xts_full_alloc (struct zpc_aes_xts_full **ctx)
int zpc_aes_xts_full_set_key (struct zpc_aes_xts_full *ctx, struct
zpc_aes_xts_key *key)
int zpc_aes_xts_full_set_iv (struct zpc_aes_xts_full *ctx, const
unsigned char *iv)
int zpc_aes_xts_full_export (struct zpc_aes_xts_full *ctx, unsigned char
state[32])
int zpc_aes_xts_full_import (struct zpc_aes_xts_full *ctx, const
unsigned char state[32])
int zpc_aes_xts_full_encrypt (struct zpc_aes_xts_full *ctx, unsigned
char *ct, const unsigned char *pt, size_t ptlen)
int zpc_aes_xts_full_decrypt (struct zpc_aes_xts_full *ctx, unsigned
char *pt, const unsigned char *ct, size_t ctlen)
void zpc_aes_xts_full_free (struct zpc_aes_xts_full **ctx)
π¦ Detailed Description π¦
So like, this is the AES-XTS-FULL API, and it's giving main character energy. β¨
It's an 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]. Yes, that's a lot of words. No, I'm not skipping any of them. π
Here's the tea: in contrast to the AES-XTS API, the AES-XTS-FULL API uses full-xts protected keys containing two single AES keys in one single protected key. That's the whole flex. And bestie, this feature requires MSA 10. Don't forget it. π
Definition in file aes_xts_full.h.
π Function Documentation π
int zpc_aes_xts_full_alloc (struct zpc_aes_xts_full ** ctx)
Allocates a new context for an AES-XTS operation to be used with an AES full-xts key object. Fresh context, fresh me. π«Ά
Parameters
ctxβ AES-FULL-XTS context
Returns
0 on success. Otherwise, a non-zero error code is returned. (No cap.)
int zpc_aes_xts_full_set_key (struct zpc_aes_xts_full * ctx, struct zpc_aes_xts_key * key)
Sets the AES full-xts key to be used in the context of an AES-XTS operation. Key goes in, vibes go up. π
Parameters
ctxβ AES-FULL-XTS contextkeyβ full-xts key
Returns
0 on success. Otherwise, a non-zero error code is returned.
int zpc_aes_xts_full_set_iv (struct zpc_aes_xts_full * ctx, const unsigned char * iv)
Sets the initialization vector to be used in the context of an AES-XTS operation. It's literally 16 bytes of pure potential. β¨
Parameters
ctxβ AES-FULL-XTS contextivβ 16 byte initialization vector
Returns
0 on success. Otherwise, a non-zero error code is returned.
int zpc_aes_xts_full_export (struct zpc_aes_xts_full * ctx, unsigned char state[32])
Gets the intermediate state information used in the context of an AES-XTS operation. Like a screenshot of your crypto state, but make it 32 bytes. πΈ
Parameters
ctxβ AES-FULL-XTS contextstateβ application provided buffer with 32 bytes size to receive the 32 byte intermediate state information. Yes, it says 32 twice. It's thorough. π
Returns
0 on success. Otherwise, a non-zero error code is returned.
int zpc_aes_xts_full_import (struct zpc_aes_xts_full * ctx, const unsigned char state[32])
Sets the intermediate state information to be used in the context of an AES-XTS operation. It's the glow-up of export, fr fr.
Parameters
ctxβ AES-FULL-XTS contextstateβ 32 byte intermediate state information as obtained viazpc_aes_xts_full_export()
Returns
0 on success. Otherwise, a non-zero error code is returned.
int zpc_aes_xts_full_encrypt (struct zpc_aes_xts_full * ctx, unsigned char * ct, const unsigned char * pt, size_t ptlen)
Does an AES-XTS encryption operation. Plaintext in, ciphertext out, slay. π₯
Parameters
ctxβ AES-FULL-XTS contextctβ ciphertextptβ plaintextptlenβ plaintext length [bytes]
Returns
0 on success. Otherwise, a non-zero error code is returned.
int zpc_aes_xts_full_decrypt (struct zpc_aes_xts_full * ctx, unsigned char * pt, const unsigned char * ct, size_t ctlen)
Does an AES-XTS decryption operation. Ciphertext in, plaintext out, and we're back to the original vibe. π
Parameters
ctxβ AES-FULL-XTS contextptβ plaintextctβ ciphertextctlenβ ciphertext length [bytes]
Returns
0 on success. Otherwise, a non-zero error code is returned.
void zpc_aes_xts_full_free (struct zpc_aes_xts_full ** ctx)
Frees an AES-FULL-XTS context. Clean up after yourself, bestie. π§Ή
Parameters
ctxβ AES-FULL-XTS context
π Author π
Generated automatically by Doxygen for libzpc from the source code. So like, not a human, but honestly the algorithm ate. π
π Sign-off π
That's the whole page! It's libzpc, Version 1.4, and this little beauty lives at /home/abui..._xts_full.h(3). Go forth and encrypt responsibly. πβ¨πΈ
π¦ 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