libzpc 1.5
IBM Z Protected-key Crypto library
Loading...
Searching...
No Matches
aes_xts_full.h
Go to the documentation of this file.
1/*
2 * Copyright IBM Corp. 2025
3 *
4 * libzpc is free software; you can redistribute it and/or modify
5 * it under the terms of the MIT license. See LICENSE for details.
6 */
7
8#ifndef ZPC_AES_XTS_FULL_H
9# define ZPC_AES_XTS_FULL_H
10
11# ifdef __cplusplus
12/* *INDENT-OFF* */
13extern "C" {
14/* *INDENT-ON* */
15# endif
16
30
31# include "aes_xts_key.h"
32# include <stddef.h>
33
34struct zpc_aes_xts_full;
35
42__attribute__((visibility("default")))
43int zpc_aes_xts_full_alloc(struct zpc_aes_xts_full **ctx);
50__attribute__((visibility("default")))
51int zpc_aes_xts_full_set_key(struct zpc_aes_xts_full *ctx, struct zpc_aes_xts_key *key);
59__attribute__((visibility("default")))
60int zpc_aes_xts_full_set_iv(struct zpc_aes_xts_full *ctx, const unsigned char *iv);
69__attribute__((visibility("default")))
70int zpc_aes_xts_full_export(struct zpc_aes_xts_full *ctx, unsigned char state[32]);
79__attribute__((visibility("default")))
80int zpc_aes_xts_full_import(struct zpc_aes_xts_full *ctx, const unsigned char state[32]);
89__attribute__((visibility("default")))
90int zpc_aes_xts_full_encrypt(struct zpc_aes_xts_full *ctx, unsigned char *ct,
91 const unsigned char *pt, size_t ptlen);
100__attribute__((visibility("default")))
101int zpc_aes_xts_full_decrypt(struct zpc_aes_xts_full *ctx, unsigned char *pt,
102 const unsigned char *ct, size_t ctlen);
107__attribute__((visibility("default")))
108void zpc_aes_xts_full_free(struct zpc_aes_xts_full **ctx);
109
110# ifdef __cplusplus
111/* *INDENT-OFF* */
112}
113/* *INDENT-ON* */
114# endif
115#endif
void zpc_aes_xts_full_free(struct zpc_aes_xts_full **ctx)
int zpc_aes_xts_full_set_iv(struct zpc_aes_xts_full *ctx, const unsigned char *iv)
int zpc_aes_xts_full_alloc(struct zpc_aes_xts_full **ctx)
int zpc_aes_xts_full_set_key(struct zpc_aes_xts_full *ctx, struct zpc_aes_xts_key *key)
int zpc_aes_xts_full_decrypt(struct zpc_aes_xts_full *ctx, unsigned char *pt, const unsigned char *ct, size_t ctlen)
int zpc_aes_xts_full_encrypt(struct zpc_aes_xts_full *ctx, unsigned char *ct, const unsigned char *pt, size_t ptlen)
int zpc_aes_xts_full_import(struct zpc_aes_xts_full *ctx, const unsigned char state[32])
int zpc_aes_xts_full_export(struct zpc_aes_xts_full *ctx, unsigned char state[32])
AES full-xts key API.