apm32f4xx_crypto_cipher.h File Reference

APM32F4 cipher hardware accelerator. More...

#include "core/crypto.h"

Go to the source code of this file.

Macros

#define APM32F4XX_CRYPTO_CIPHER_SUPPORT   DISABLED
 
#define CRYP_CTRL_CRYPEN   0x00008000
 
#define CRYP_CTRL_FFLUSH   0x00004000
 
#define CRYP_CTRL_KSIZESEL   0x00000300
 
#define CRYP_CTRL_KSIZESEL_128B   0x00000000
 
#define CRYP_CTRL_KSIZESEL_192B   0x00000100
 
#define CRYP_CTRL_KSIZESEL_256B   0x00000200
 
#define CRYP_CTRL_DTSEL   0x000000C0
 
#define CRYP_CTRL_DTSEL_32B   0x00000000
 
#define CRYP_CTRL_DTSEL_16B   0x00000040
 
#define CRYP_CTRL_DTSEL_8B   0x00000080
 
#define CRYP_CTRL_DTSEL_1B   0x000000C0
 
#define CRYP_CTRL_ALGOMSEL   0x00000038
 
#define CRYP_CTRL_ALGOMSEL_TDES_ECB   0x00000000
 
#define CRYP_CTRL_ALGOMSEL_TDES_CBC   0x00000008
 
#define CRYP_CTRL_ALGOMSEL_DES_ECB   0x00000010
 
#define CRYP_CTRL_ALGOMSEL_DES_CBC   0x00000018
 
#define CRYP_CTRL_ALGOMSEL_AES_ECB   0x00000020
 
#define CRYP_CTRL_ALGOMSEL_AES_CBC   0x00000028
 
#define CRYP_CTRL_ALGOMSEL_AES_CTR   0x00000030
 
#define CRYP_CTRL_ALGOMSEL_AES_KEY   0x00000038
 
#define CRYP_CTRL_ALGODIRSEL   0x00000004
 
#define CRYP_STS_BUSY   0x00000010
 
#define CRYP_STS_OFFULL   0x00000008
 
#define CRYP_STS_OFEMPT   0x00000004
 
#define CRYP_STS_IFFULL   0x00000002
 
#define CRYP_STS_IFEMPT   0x00000001
 

Functions

error_t crypInit (void)
 CRYP module initialization. More...
 

Detailed Description

APM32F4 cipher hardware accelerator.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneCRYPTO Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.0

Definition in file apm32f4xx_crypto_cipher.h.

Macro Definition Documentation

◆ APM32F4XX_CRYPTO_CIPHER_SUPPORT

#define APM32F4XX_CRYPTO_CIPHER_SUPPORT   DISABLED

Definition at line 39 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_ALGODIRSEL

#define CRYP_CTRL_ALGODIRSEL   0x00000004

Definition at line 65 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_ALGOMSEL

#define CRYP_CTRL_ALGOMSEL   0x00000038

Definition at line 56 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_ALGOMSEL_AES_CBC

#define CRYP_CTRL_ALGOMSEL_AES_CBC   0x00000028

Definition at line 62 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_ALGOMSEL_AES_CTR

#define CRYP_CTRL_ALGOMSEL_AES_CTR   0x00000030

Definition at line 63 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_ALGOMSEL_AES_ECB

#define CRYP_CTRL_ALGOMSEL_AES_ECB   0x00000020

Definition at line 61 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_ALGOMSEL_AES_KEY

#define CRYP_CTRL_ALGOMSEL_AES_KEY   0x00000038

Definition at line 64 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_ALGOMSEL_DES_CBC

#define CRYP_CTRL_ALGOMSEL_DES_CBC   0x00000018

Definition at line 60 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_ALGOMSEL_DES_ECB

#define CRYP_CTRL_ALGOMSEL_DES_ECB   0x00000010

Definition at line 59 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_ALGOMSEL_TDES_CBC

#define CRYP_CTRL_ALGOMSEL_TDES_CBC   0x00000008

Definition at line 58 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_ALGOMSEL_TDES_ECB

#define CRYP_CTRL_ALGOMSEL_TDES_ECB   0x00000000

Definition at line 57 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_CRYPEN

#define CRYP_CTRL_CRYPEN   0x00008000

Definition at line 45 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_DTSEL

#define CRYP_CTRL_DTSEL   0x000000C0

Definition at line 51 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_DTSEL_16B

#define CRYP_CTRL_DTSEL_16B   0x00000040

Definition at line 53 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_DTSEL_1B

#define CRYP_CTRL_DTSEL_1B   0x000000C0

Definition at line 55 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_DTSEL_32B

#define CRYP_CTRL_DTSEL_32B   0x00000000

Definition at line 52 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_DTSEL_8B

#define CRYP_CTRL_DTSEL_8B   0x00000080

Definition at line 54 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_FFLUSH

#define CRYP_CTRL_FFLUSH   0x00004000

Definition at line 46 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_KSIZESEL

#define CRYP_CTRL_KSIZESEL   0x00000300

Definition at line 47 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_KSIZESEL_128B

#define CRYP_CTRL_KSIZESEL_128B   0x00000000

Definition at line 48 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_KSIZESEL_192B

#define CRYP_CTRL_KSIZESEL_192B   0x00000100

Definition at line 49 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_CTRL_KSIZESEL_256B

#define CRYP_CTRL_KSIZESEL_256B   0x00000200

Definition at line 50 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_STS_BUSY

#define CRYP_STS_BUSY   0x00000010

Definition at line 68 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_STS_IFEMPT

#define CRYP_STS_IFEMPT   0x00000001

Definition at line 72 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_STS_IFFULL

#define CRYP_STS_IFFULL   0x00000002

Definition at line 71 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_STS_OFEMPT

#define CRYP_STS_OFEMPT   0x00000004

Definition at line 70 of file apm32f4xx_crypto_cipher.h.

◆ CRYP_STS_OFFULL

#define CRYP_STS_OFFULL   0x00000008

Definition at line 69 of file apm32f4xx_crypto_cipher.h.

Function Documentation

◆ crypInit()

error_t crypInit ( void  )

CRYP module initialization.

Returns
Error code

Definition at line 53 of file apm32f4xx_crypto_cipher.c.