/home/abui.../aes_key.h(3)
π§ /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
0on 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
0on 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, orZPC_AES_KEY_TYPE_PVSECRET.
Returns
0on 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
0on 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
0on 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
0on 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
0on 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
0on 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
0on 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
0on 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_CURRENTorZPC_AES_KEY_REENCIPHER_CURRENT_TO_NEW. This function is not applicable for keys of type PVSECRET and returnsZPC_ERROR_KEYTYPEwhen called for such keys.
Returns
0on 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
- 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