MAX32690 public-key hardware accelerator. More...
#include "mxc_device.h"
#include "mxc_sys.h"
#include "ctb.h"
#include "core/crypto.h"
#include "hardware/max32690/max32690_crypto.h"
#include "hardware/max32690/max32690_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 | |
void | maaSetValue (uint_t offset, uint32_t value, uint_t length) |
Set operand value. More... | |
void | maaImportMpi (uint_t offset, const Mpi *a, uint_t length) |
Import multiple-precision integer. More... | |
error_t | maaExportMpi (uint_t offset, Mpi *r, uint_t length) |
Export multiple-precision integer. More... | |
error_t | mpiExpModFast (Mpi *r, const Mpi *a, const Mpi *e, const Mpi *p) |
Modular exponentiation (fast calculation) More... | |
error_t | mpiExpModRegular (Mpi *r, const Mpi *a, const Mpi *e, const Mpi *p) |
Modular exponentiation (regular calculation) More... | |
error_t | ecMulMod (const EcDomainParameters *params, Mpi *r, const Mpi *a, const Mpi *b) |
Modular multiplication. More... | |
error_t | ecSqrMod (const EcDomainParameters *params, Mpi *r, const Mpi *a) |
Fast modular squaring. More... | |
Detailed Description
MAX32690 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.
- Version
- 2.4.4
Definition in file max32690_crypto_pkc.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Definition at line 32 of file max32690_crypto_pkc.c.
Function Documentation
◆ ecMulMod()
error_t ecMulMod | ( | const EcDomainParameters * | params, |
Mpi * | r, | ||
const Mpi * | a, | ||
const Mpi * | b | ||
) |
Modular multiplication.
Fast modular multiplication.
- Parameters
-
[in] params EC domain parameters [out] r Resulting integer R = (A * B) mod p [in] a An integer such as 0 <= A < p [in] b An integer such as 0 <= B < p
- Returns
- Error code
Definition at line 323 of file max32690_crypto_pkc.c.
◆ ecSqrMod()
error_t ecSqrMod | ( | const EcDomainParameters * | params, |
Mpi * | r, | ||
const Mpi * | a | ||
) |
Fast modular squaring.
- Parameters
-
[in] params EC domain parameters [out] r Resulting integer R = (A ^ 2) mod p [in] a An integer such as 0 <= A < p
- Returns
- Error code
Definition at line 389 of file max32690_crypto_pkc.c.
◆ maaExportMpi()
Export multiple-precision integer.
- Parameters
-
[in] offset MAA memory offset [out] r Pointer to the multiple-precision integer [in] length Length of the operand, in bits
- Returns
- Error code
Definition at line 117 of file max32690_crypto_pkc.c.
◆ maaImportMpi()
Import multiple-precision integer.
- Parameters
-
[in] offset MAA memory offset [in] a Pointer to the multiple-precision integer [in] length Length of the operand, in bits
Definition at line 84 of file max32690_crypto_pkc.c.
◆ maaSetValue()
Set operand value.
- Parameters
-
[in] offset MAA memory offset [in] value Value of the operand [in] length Length of the operand, in bits
Definition at line 55 of file max32690_crypto_pkc.c.
◆ mpiExpModFast()
Modular exponentiation (fast calculation)
- Parameters
-
[out] r Resulting integer R = A ^ E mod P [in] a Pointer to a multiple precision integer [in] e Exponent [in] p Modulus
- Returns
- Error code
Definition at line 167 of file max32690_crypto_pkc.c.
◆ mpiExpModRegular()
Modular exponentiation (regular calculation)
- Parameters
-
[out] r Resulting integer R = A ^ E mod P [in] a Pointer to a multiple precision integer [in] e Exponent [in] p Modulus
- Returns
- Error code
Definition at line 244 of file max32690_crypto_pkc.c.