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

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

πŸ’… /home/abui.../aes_cbc.h(3) β€” Library Functions Manual

okay so bestie, welcome to the AES-CBC page πŸŽ€ this is from the /home/abui.../aes_cbc.h(3) manual, and we're about to get very cozy with some block cipher functions. no cap.


✨ NAME ✨

/home/abuild/rpmbuild/BUILD/libzpc-legacy-1.5.0-build/libzpc-1.5.0/include/zpc/aes_cbc.h β€” the AES-CBC API. that's the whole vibe. it's giving "header file that knows exactly what it is." πŸ¦‹


🌸 SYNOPSIS 🌸

Functions

here's the whole squad β€” every single one of them, no cuts:

int zpc_aes_cbc_alloc (struct zpc_aes_cbc **ctx)
int zpc_aes_cbc_set_key (struct zpc_aes_cbc *ctx, struct zpc_aes_key *key)
int zpc_aes_cbc_set_iv (struct zpc_aes_cbc *ctx, const unsigned char *iv)
int zpc_aes_cbc_get_intermediate_iv (struct zpc_aes_cbc *ctx, unsigned char iv[16])
int zpc_aes_cbc_set_intermediate_iv (struct zpc_aes_cbc *ctx, const unsigned char iv[16])
int zpc_aes_cbc_encrypt (struct zpc_aes_cbc *ctx, unsigned char *ct, const unsigned char *pt, size_t ptlen)
int zpc_aes_cbc_decrypt (struct zpc_aes_cbc *ctx, unsigned char *pt, const unsigned char *ct, size_t ctlen)
void zpc_aes_cbc_free (struct zpc_aes_cbc **ctx)

πŸ’œ Detailed Description πŸ’œ

AES-CBC API. literally the entire subtitle. πŸ’…

so this is the encryption API for the Advanced Encryption Standard (AES) block cipher [1], operating in Cipher Block Chaining (CBC) mode of operation [8]. that's the tea β˜• β€” AES, but chained, bestie.

Definition in file aes_cbc.h. that's where it lives, that's where it eats. πŸ“

πŸ‘‘ Function Documentation πŸ‘‘

πŸ’– int zpc_aes_cbc_alloc (struct zpc_aes_cbc ** ctx)

allocate a shiny new context for an AES-CBC operation ✨ fresh out the box, main character energy.

Parameters

  • ctx β€” AES-CBC context

Returns

0 on success. otherwise, a non-zero error code is returned. (so like, check it, bestie. don't just assume. 😭)


πŸ¦‹ int zpc_aes_cbc_set_key (struct zpc_aes_cbc * ctx, struct zpc_aes_key * key)

set the key to be used in the context of an AES-CBC operation. the key!! the most important part!! πŸ”₯

Parameters

  • ctx β€” AES-CBC context
  • key β€” AES key

Returns

0 on success. otherwise, a non-zero error code is returned.


🌈 int zpc_aes_cbc_set_iv (struct zpc_aes_cbc * ctx, const unsigned char * iv)

set the initialization vector to be used in the context of an AES-CBC operation. yes bestie, CBC needs an IV, this is not optional, this is the whole point of chaining πŸ’€

Parameters

  • ctx β€” AES-CBC context
  • iv β€” 16 byte initialization vector

Returns

0 on success. otherwise, a non-zero error code is returned.


🧚 int zpc_aes_cbc_get_intermediate_iv (struct zpc_aes_cbc * ctx, unsigned char iv[16])

get the intermediate initialization vector to be used in the context of an AES-CBC operation. peek at it. read it. it's yours now πŸ‘€

Parameters

  • ctx β€” AES-CBC context
  • iv β€” application provided buffer with 16 bytes size to receive the 16 byte intermediate iv β€” so you bring the buffer, and it must be 16 bytes, okurrr πŸŽ€

Returns

0 on success. otherwise, a non-zero error code is returned.


⭐ int zpc_aes_cbc_set_intermediate_iv (struct zpc_aes_cbc * ctx, const unsigned char iv[16])

set the intermediate initialization vector to be used in the context of an AES-CBC operation.

🚨 important bestie: an initial iv must be set before via zpc_aes_cbc_set_iv. like, do that first. order matters. no skipping steps πŸ™ˆ

Parameters

  • ctx β€” AES-CBC context
  • iv β€” 16 byte intermediate iv

Returns

0 on success. otherwise, a non-zero error code is returned.


πŸ”₯ int zpc_aes_cbc_encrypt (struct zpc_aes_cbc * ctx, unsigned char * ct, const unsigned char * pt, size_t ptlen)

do an AES-CBC encryption operation. turn that plaintext into ciphertext, slay πŸ’…βœ¨

Parameters

  • ctx β€” AES-CBC context
  • ct β€” ciphertext
  • pt β€” plaintext
  • ptlen β€” plaintext length [bytes]

Returns

0 on success. otherwise, a non-zero error code is returned.


🫢 int zpc_aes_cbc_decrypt (struct zpc_aes_cbc * ctx, unsigned char * pt, const unsigned char * ct, size_t ctlen)

do an AES-CBC decryption operation. the reverse slay. ciphertext goes in, plaintext comes out 🌸

Parameters

  • ctx β€” AES-CBC context
  • pt β€” plaintext
  • ct β€” ciphertext
  • ctlen β€” ciphertext length [bytes]

Returns

0 on success. otherwise, a non-zero error code is returned.


πŸŽ€ void zpc_aes_cbc_free (struct zpc_aes_cbc ** ctx)

free an AES-CBC context. clean up after yourself, bestie β€” leaving contexts lying around is not the move 😭🧹

Parameters

  • ctx β€” AES-CBC context

🌟 Author 🌟

generated automatically by Doxygen for libzpc from the source code. not a human, just a very diligent robot πŸ§šβ€β™€οΈ


and that's the page!! hope you had fun, iykyk πŸ’–

libzpc Β· Version 1.4 Β· /home/abui.../aes_cbc.h(3) β€” ok bye bestie, go encrypt something iconic πŸ‘‘πŸ’œ
πŸ“¦ where this page comes from