AES_XTS_FULL.H(3)

πŸ“¦ version 1.5.0, in opensuse-leap 16.0

πŸ’… 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 context
  • key β€” 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 context
  • iv β€” 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 context
  • state β€” 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 context
  • state β€” 32 byte intermediate state information as obtained via zpc_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 context
  • ct β€” ciphertext
  • pt β€” plaintext
  • ptlen β€” 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 context
  • pt β€” plaintext
  • ct β€” ciphertext
  • ctlen β€” 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