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

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

🧚 /home/abui.../aes_key.h(3) 🧚

okay so bestie, this is the <pink>/home/abui.../aes_key.h(3)</pink> page from the Library Functions Manual, and it's literally all about the AES key API. no cap, it's giving crypto-key management main character energy. πŸ’…

🌸 NAME 🌸

/home/abuild/rpmbuild/BUILD/libzpc-
legacy-1.5.0-build/libzpc-1.5.0/include/zpc/aes_key.h

β€” AES key API. 🫢

✨ SYNOPSIS ✨

here's the whole cast list, exact, no edits:

πŸŽ€ Macros

#define ZPC_AES_KEY_TYPE_CCA_DATA   1
#define ZPC_AES_KEY_TYPE_CCA_CIPHER   2
#define ZPC_AES_KEY_TYPE_EP11   3
#define ZPC_AES_KEY_TYPE_PVSECRET   9
#define ZPC_AES_KEY_REENCIPHER_OLD_TO_CURRENT   1
#define ZPC_AES_KEY_REENCIPHER_CURRENT_TO_NEW   2

πŸ¦‹ Enumerations

enum zpc_aessecret_type_t { ZPC_AES_SECRET_TYPE_NOT_SET = -2,
    ZPC_AES_SECRET_TYPE_INVALID = -1, ZPC_AES_SECRET_AES_128 = 0x04,
    ZPC_AES_SECRET_AES_192 = 0x05, ZPC_AES_SECRET_AES_256 = 0x06 }

πŸ’– Functions

int zpc_aes_key_alloc (struct zpc_aes_key **key)
int zpc_aes_key_set_size (struct zpc_aes_key *key, int size)
int zpc_aes_key_set_type (struct zpc_aes_key *key, int type)
int zpc_aes_key_set_flags (struct zpc_aes_key *key, unsigned int flags)
int zpc_aes_key_set_mkvp (struct zpc_aes_key *key, const char *mkvp)
int zpc_aes_key_set_apqns (struct zpc_aes_key *key, const char *apqns[])
int zpc_aes_key_import (struct zpc_aes_key *key, const unsigned char
    *seckey, size_t seckeylen)
int zpc_aes_key_import_clear (struct zpc_aes_key *key, const unsigned
    char *clrkey)
int zpc_aes_key_export (struct zpc_aes_key *key, unsigned char *seckey,
    size_t *seckeylen)
int zpc_aes_key_generate (struct zpc_aes_key *key)
int zpc_aes_key_reencipher (struct zpc_aes_key *key, int reenc)
void zpc_aes_key_free (struct zpc_aes_key **key)

🌈 Detailed Description 🌈

okay so this is the vibe check: AES key API. It's all about managing advanced Encryption Standard (AES) block cipher [1] keys. 🫢

Definition in file aes_key.h.

πŸ‘‘ Macro Definition Documentation πŸ‘‘

πŸ’… Macro: ZPC_AES_KEY_TYPE_CCA_DATA

#define ZPC_AES_KEY_TYPE_CCA_DATA   1

Definition at line 29 of file aes_key.h.

πŸ’… Macro: ZPC_AES_KEY_TYPE_CCA_CIPHER

#define ZPC_AES_KEY_TYPE_CCA_CIPHER   2

Definition at line 30 of file aes_key.h.

πŸ’… Macro: ZPC_AES_KEY_TYPE_EP11

#define ZPC_AES_KEY_TYPE_EP11   3

Definition at line 31 of file aes_key.h.

πŸ’… Macro: ZPC_AES_KEY_TYPE_PVSECRET

#define ZPC_AES_KEY_TYPE_PVSECRET   9

Definition at line 32 of file aes_key.h.

πŸ’… Macro: ZPC_AES_KEY_REENCIPHER_OLD_TO_CURRENT

#define ZPC_AES_KEY_REENCIPHER_OLD_TO_CURRENT   1

Definition at line 34 of file aes_key.h.

πŸ’… Macro: ZPC_AES_KEY_REENCIPHER_CURRENT_TO_NEW

#define ZPC_AES_KEY_REENCIPHER_CURRENT_TO_NEW   2

Definition at line 35 of file aes_key.h.

πŸ¦‹ Enumeration Type Documentation πŸ¦‹

🌟 enum zpc_aessecret_type_t

Definition at line 37 of file aes_key.h.

πŸ”₯ Function Documentation πŸ”₯

⭐ int zpc_aes_key_alloc (struct zpc_aes_key ** key)

This allocates a brand-new AES key object, and its reference count starts at 1. ✨

Parameters

  • key β€” AES key.

Returns

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

⭐ int zpc_aes_key_set_size (struct zpc_aes_key * key, int size)

Sets the AES key size. πŸ“

Parameters

  • key β€” AES key.
  • size β€” 128, 192 or 256 bit key size.

Returns

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

⭐ int zpc_aes_key_set_type (struct zpc_aes_key * key, int type)

Sets the AES key type. 🏷️

Parameters

  • key β€” AES key.
  • type β€” ZPC_AES_KEY_TYPE_CCA_DATA, ZPC_AES_KEY_TYPE_CCA_CIPHER, ZPC_AES_KEY_TYPE_EP11, or ZPC_AES_KEY_TYPE_PVSECRET.

Returns

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

⭐ int zpc_aes_key_set_flags (struct zpc_aes_key * key, unsigned int flags)

Sets the AES key flags. 🚩

Parameters

  • key β€” AES key.
  • flags β€” key flags.

Returns

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

⭐ int zpc_aes_key_set_mkvp (struct zpc_aes_key * key, const char * mkvp)

Sets the AES key Master Key Verification Pattern. πŸ”‘

Parameters

  • key β€” AES key.
  • mkvp β€” master key verification pattern. This function has no effect for keys of type PVSECRET.

Returns

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

⭐ int zpc_aes_key_set_apqns (struct zpc_aes_key * key, const char * apqns[])

Sets the AES key APQNs. 🧩

Parameters

  • key β€” AES key.
  • apqns β€” NULL-terminated APQN list. This function has no effect for keys of type PVSECRET.

Returns

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

⭐ int zpc_aes_key_import (struct zpc_aes_key * key, const unsigned char * seckey, size_t seckeylen)

Imports an AES secure-key. πŸ“₯

Parameters

  • key β€” AES key.
  • seckey β€” AES secure-key.
  • seckeylen β€” AES key secure-length [bytes].

Returns

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

⭐ int zpc_aes_key_import_clear (struct zpc_aes_key * key, const unsigned char * clrkey)

Imports an AES clear-key. 🫧

Parameters

  • key β€” AES key.
  • clrkey β€” AES clear-key.

Returns

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

⭐ int zpc_aes_key_export (struct zpc_aes_key * key, unsigned char * seckey, size_t * seckeylen)

Exports an AES secure-key. πŸ“€

Parameters

  • key β€” AES key.
  • seckey β€” AES secure-key.
  • seckeylen β€” secure AES secure-key length [bytes].

Returns

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

⭐ int zpc_aes_key_generate (struct zpc_aes_key * key)

Generates an AES secure-key. πŸͺ„

Parameters

  • key β€” AES key.

Returns

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

⭐ int zpc_aes_key_reencipher (struct zpc_aes_key * key, int reenc)

Reenciphers an AES secure-key. πŸ”

Parameters

  • key β€” AES key.
  • reenc β€” ZPC_AES_KEY_REENCIPHER_OLD_TO_CURRENT or ZPC_AES_KEY_REENCIPHER_CURRENT_TO_NEW. This function is not applicable for keys of type PVSECRET and returns ZPC_ERROR_KEYTYPE when called for such keys.

Returns

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

⭐ void zpc_aes_key_free (struct zpc_aes_key ** key)

Decreases the reference count of an AES key object and frees it when the count reaches 0. 🧹

Parameters

  • key β€” AES key.

🌸 Author 🌸

Generated automatically by Doxygen for libzpc from the source code. slay, automation. πŸ€–βœ¨


and that's the whole page, bestie! 🫢 this footer says libzpc Version 1.4 and the page is /home/abui.../aes_key.h(3). bye bestie, go manage those AES keys. πŸ’–

πŸ“¦ where this page comes from