/home/abui.../aes_xts.h(3)

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

πŸ’… 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

  • 0 on 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 context
  • key1 β€” first AES key
  • key2 β€” second AES key

Returns

  • 0 on 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 context
  • iv β€” 16 byte initialization vector

Returns

  • 0 on 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 context
  • iv β€” application provided buffer with 16 bytes size to receive the 16 byte intermediate iv

Returns

  • 0 on 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 context
  • iv β€” 16 byte intermediate iv

Returns

  • 0 on 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 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_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 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_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