linux/drivers/crypto/ccree/cc_aead.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2012-2019 ARM Limited (or its affiliates). */

/* \file cc_aead.h
 * ARM CryptoCell AEAD Crypto API
 */

#ifndef __CC_AEAD_H__
#define __CC_AEAD_H__

#include <linux/kernel.h>
#include <crypto/algapi.h>
#include <crypto/ctr.h>

/* mac_cmp - HW writes 8 B but all bytes hold the same value */
#define ICV_CMP_SIZE
#define CCM_CONFIG_BUF_SIZE
#define MAX_MAC_SIZE

/* defines for AES GCM configuration buffer */
#define GCM_BLOCK_LEN_SIZE

#define GCM_BLOCK_RFC4_IV_OFFSET
#define GCM_BLOCK_RFC4_IV_SIZE
#define GCM_BLOCK_RFC4_NONCE_OFFSET
#define GCM_BLOCK_RFC4_NONCE_SIZE

/* Offsets into AES CCM configuration buffer */
#define CCM_B0_OFFSET
#define CCM_A0_OFFSET
#define CCM_CTR_COUNT_0_OFFSET
/* CCM B0 and CTR_COUNT constants. */
#define CCM_BLOCK_NONCE_OFFSET
#define CCM_BLOCK_NONCE_SIZE
#define CCM_BLOCK_IV_OFFSET
#define CCM_BLOCK_IV_SIZE

enum aead_ccm_header_size {};

struct aead_req_ctx {};

int cc_aead_alloc(struct cc_drvdata *drvdata);
int cc_aead_free(struct cc_drvdata *drvdata);

#endif /*__CC_AEAD_H__*/