mimxrt1170_crypto_pkc.c File Reference

i.MX RT1170 public-key hardware accelerator More...

#include "fsl_device_registers.h"
#include "fsl_caam.h"
#include "core/crypto.h"
#include "hardware/mimxrt1170/mimxrt1170_crypto.h"
#include "hardware/mimxrt1170/mimxrt1170_crypto_pkc.h"
#include "ecc/ec.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL
 

Functions

error_t mpiMulMod (Mpi *r, const Mpi *a, const Mpi *b, const Mpi *p)
 Modular multiplication. More...
 
error_t mpiExpMod (Mpi *r, const Mpi *a, const Mpi *e, const Mpi *p)
 Modular exponentiation. More...
 
error_t ecMult (const EcDomainParameters *params, EcPoint *r, const Mpi *d, const EcPoint *s)
 Scalar multiplication. More...
 

Variables

PkhaArgs pkhaArgs
 
PkhaEccArgs pkhaEccArgs
 

Detailed Description

i.MX RT1170 public-key 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 mimxrt1170_crypto_pkc.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL

Definition at line 32 of file mimxrt1170_crypto_pkc.c.

Function Documentation

◆ ecMult()

error_t ecMult ( const EcDomainParameters params,
EcPoint r,
const Mpi d,
const EcPoint s 
)

Scalar multiplication.

Parameters
[in]paramsEC domain parameters
[out]rResulting point R = d.S
[in]dAn integer d such as 0 <= d < p
[in]sEC point
Returns
Error code

Definition at line 241 of file mimxrt1170_crypto_pkc.c.

◆ mpiExpMod()

error_t mpiExpMod ( Mpi r,
const Mpi a,
const Mpi e,
const Mpi p 
)

Modular exponentiation.

Parameters
[out]rResulting integer R = A ^ E mod P
[in]aPointer to a multiple precision integer
[in]eExponent
[in]pModulus
Returns
Error code

Definition at line 159 of file mimxrt1170_crypto_pkc.c.

◆ mpiMulMod()

error_t mpiMulMod ( Mpi r,
const Mpi a,
const Mpi b,
const Mpi p 
)

Modular multiplication.

Parameters
[out]rResulting integer R = A * B mod P
[in]aThe first operand A
[in]bThe second operand B
[in]pThe modulus P
Returns
Error code

Definition at line 60 of file mimxrt1170_crypto_pkc.c.

Variable Documentation

◆ pkhaArgs

PkhaArgs pkhaArgs

Definition at line 47 of file mimxrt1170_crypto_pkc.c.

◆ pkhaEccArgs

PkhaEccArgs pkhaEccArgs

Definition at line 48 of file mimxrt1170_crypto_pkc.c.