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

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

πŸ’– NAME πŸ’–

okay so bestie, welcome to the /home/abui..._xts_key.h(3) page from the Library Functions Manual ✨ this one is all about libzpc's AES full-xts key API, and we are gonna get you comfy with it, no cap πŸ’…

/home/abuild/rpmbuild/BUILD/libzpc-legacy-1.5.0-build/libzpc-1.5.0/include/zpc/aes_xts_key.h β€” AES full-xts key API.


🌸 SYNOPSIS 🌸

πŸŽ€ Macros

#define ZPC_AES_XTS_KEY_TYPE_PVSECRET   9

πŸ¦‹ Enumerations

enum zpc_xtssecret_type_t { ZPC_XTS_SECRET_TYPE_NOT_SET = -2,
    ZPC_XTS_SECRET_TYPE_INVALID = -1, ZPC_XTS_SECRET_AES_XTS_128 = 0x07,
    ZPC_XTS_SECRET_AES_XTS_256 = 0x08 }

✨ Functions

int zpc_aes_xts_key_alloc (struct zpc_aes_xts_key **key)
int zpc_aes_xts_key_set_size (struct zpc_aes_xts_key *key, int size)
int zpc_aes_xts_key_set_type (struct zpc_aes_xts_key *key, int type)
int zpc_aes_xts_key_import (struct zpc_aes_xts_key *key, const unsigned char *seckey, size_t seckeylen)
int zpc_aes_xts_key_import_clear (struct zpc_aes_xts_key *key, const unsigned char *clrkey)
int zpc_aes_xts_key_export (struct zpc_aes_xts_key *key, unsigned char *seckey, size_t *seckeylen)
int zpc_aes_xts_key_generate (struct zpc_aes_xts_key *key)
void zpc_aes_xts_key_free (struct zpc_aes_xts_key **key)

πŸ¦‹ Detailed Description πŸ¦‹

AES full-xts key API.

Manage advanced Encryption Standard (AES) block cipher [9] keys to be used in a full-xts context.

Definition in file aes_xts_key.h.


πŸŽ€ Macro Definition Documentation πŸŽ€

ZPC_AES_XTS_KEY_TYPE_PVSECRET

#define ZPC_AES_XTS_KEY_TYPE_PVSECRET   9

Definition at line 29 of file aes_xts_key.h.


🌈 Enumeration Type Documentation 🌈

enum zpc_xtssecret_type_t

Definition at line 31 of file aes_xts_key.h.


πŸ‘‘ Function Documentation πŸ‘‘

πŸ’œ zpc_aes_xts_key_alloc

int zpc_aes_xts_key_alloc (struct zpc_aes_xts_key **key)

Allocate a shiny new AES full-xts key object with reference count 1 🫢

Parameters

  • key β€” AES-XTS key

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


πŸ’œ zpc_aes_xts_key_set_size

int zpc_aes_xts_key_set_size (struct zpc_aes_xts_key *key, int size)

Set the AES full-xts key size, bestie.

Parameters

  • key β€” AES-XTS key
  • size β€” 128 or 256 bit key size

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


πŸ’œ zpc_aes_xts_key_set_type

int zpc_aes_xts_key_set_type (struct zpc_aes_xts_key *key, int type)

Set the AES full-xts key type.

Parameters

  • key β€” AES-XTS key
  • type β€” currently only ZPC_AES_XTS_KEY_TYPE_PVSECRET

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


πŸ’œ zpc_aes_xts_key_import

int zpc_aes_xts_key_import (struct zpc_aes_xts_key *key, const unsigned char *seckey, size_t seckeylen)

Import an AES-XTS protected key origin (secure key or pvsecret ID).

Parameters

  • key β€” AES full-xts key
  • seckey β€” AES full-xts protected key origin (secure-key or pvsecret ID)
  • seckeylen β€” AES full-xts protected key origin length [bytes]

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


πŸ’œ zpc_aes_xts_key_import_clear

int zpc_aes_xts_key_import_clear (struct zpc_aes_xts_key *key, const unsigned char *clrkey)

Import an AES-XTS clear-key.

Parameters

  • key β€” AES-XTS key. If the key object has no type set, a full-xts protected key is created from the given key material. If the type is set to ZPC_AES_XTS_KEY_TYPE_PVSECRET then the import is not possible.
  • clrkey β€” AES XTS clear-key. The application must provide concatenated key material for two single AES keys of the specified size, i.e. either 2 x 16 bytes or 2 x 32 bytes.

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


πŸ’œ zpc_aes_xts_key_export

int zpc_aes_xts_key_export (struct zpc_aes_xts_key *key, unsigned char *seckey, size_t *seckeylen)

Export an AES-XTS protected key origin (secure key or pvsecret ID).

Parameters

  • key β€” AES full-xts key
  • seckey β€” AES full-xts protected key origin (secure-key or pvsecret ID)
  • seckeylen β€” secure AES full-xts protected key origin length [bytes]

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


πŸ’œ zpc_aes_xts_key_generate

int zpc_aes_xts_key_generate (struct zpc_aes_xts_key *key)

Generate an AES-XTS key. If the key object has no type set, a full-xts random protected key is created. If the type is set to ZPC_AES_XTS_KEY_TYPE_PVSECRET then generate is not possible.

Parameters

  • key β€” AES full-xts key

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


πŸ’œ zpc_aes_xts_key_free

void zpc_aes_xts_key_free (struct zpc_aes_xts_key **key)

Decrease the reference count of an AES full-xts key object and free it when the count reaches 0.

Parameters

  • key β€” AES full-xts key

✍️ Author ✍️

Generated automatically by Doxygen for libzpc from the source code.


okay bestie, that's the whole page 🫢 the footer vibes are libzpc, Version 1.4, and /home/abui..._xts_key.h(3) β€” source/version sign-off secured, and no date is printed on this one, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from