M480 public-key hardware accelerator. More...
#include "m480.h"
#include "core/crypto.h"
#include "hardware/m480/m480_crypto.h"
#include "hardware/m480/m480_crypto_pkc.h"
#include "ecc/ec.h"
#include "ecc/ec_misc.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Functions | |
void | eccImportScalar (volatile uint32_t *dest, uint_t length, const uint32_t *src) |
Import scalar. More... | |
void | eccExportScalar (volatile uint32_t *src, uint_t length, uint32_t *dest) |
Export scalar. More... | |
error_t | ecMulFast (const EcCurve *curve, EcPoint3 *r, const uint32_t *d, const EcPoint3 *s) |
Scalar multiplication (fast calculation) More... | |
error_t | ecMulRegular (const EcCurve *curve, EcPoint3 *r, const uint32_t *d, const EcPoint3 *s) |
Scalar multiplication (regular calculation) More... | |
error_t | ecTwinMul (const EcCurve *curve, EcPoint3 *r, const uint32_t *d0, const EcPoint3 *s, const uint32_t *d1, const EcPoint3 *t) |
Twin multiplication. More... | |
Detailed Description
M480 public-key hardware accelerator.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 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.5.0
Definition in file m480_crypto_pkc.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Definition at line 32 of file m480_crypto_pkc.c.
Function Documentation
◆ eccExportScalar()
void eccExportScalar | ( | volatile uint32_t * | src, |
uint_t | length, | ||
uint32_t * | dest | ||
) |
Export scalar.
- Parameters
-
[in] src Pointer to the operand [in] length Length of the operand, in bits [out] dest Pointer to the scalar
Definition at line 76 of file m480_crypto_pkc.c.
◆ eccImportScalar()
void eccImportScalar | ( | volatile uint32_t * | dest, |
uint_t | length, | ||
const uint32_t * | src | ||
) |
Import scalar.
- Parameters
-
[in] dest Pointer to the operand [in] length Length of the operand, in bits [in] src Pointer to the scalar
Definition at line 54 of file m480_crypto_pkc.c.
◆ ecMulFast()
Scalar multiplication (fast calculation)
- Parameters
-
[in] curve Elliptic curve parameters [out] r Resulting point R = d.S [in] d An integer d such as 0 <= d < p [in] s EC point
- Returns
- Error code
Definition at line 100 of file m480_crypto_pkc.c.
◆ ecMulRegular()
error_t ecMulRegular | ( | const EcCurve * | curve, |
EcPoint3 * | r, | ||
const uint32_t * | d, | ||
const EcPoint3 * | s | ||
) |
Scalar multiplication (regular calculation)
- Parameters
-
[in] curve Elliptic curve parameters [out] r Resulting point R = d.S [in] d An integer d such as 0 <= d < q [in] s EC point
- Returns
- Error code
Definition at line 117 of file m480_crypto_pkc.c.
◆ ecTwinMul()
error_t ecTwinMul | ( | const EcCurve * | curve, |
EcPoint3 * | r, | ||
const uint32_t * | d0, | ||
const EcPoint3 * | s, | ||
const uint32_t * | d1, | ||
const EcPoint3 * | t | ||
) |
Twin multiplication.
- Parameters
-
[in] curve Elliptic curve parameters [out] r Resulting point R = d0.S + d1.T [in] d0 An integer d such as 0 <= d0 < p [in] s EC point [in] d1 An integer d such as 0 <= d1 < p [in] t EC point
- Returns
- Error code
Definition at line 203 of file m480_crypto_pkc.c.