|
error_t | ecScalarImport (uint32_t *r, uint_t n, const uint8_t *input, size_t length, EcScalarFormat format) |
| Octet string to integer conversion. More...
|
|
error_t | ecScalarExport (const uint32_t *a, uint_t n, uint8_t *output, size_t length, EcScalarFormat format) |
| Integer to octet string conversion. More...
|
|
uint_t | ecScalarGetByteLength (const uint32_t *a, uint_t n) |
| Get the actual length in bytes. More...
|
|
uint_t | ecScalarGetBitLength (const uint32_t *a, uint_t n) |
| Get the actual length in bits. More...
|
|
uint32_t | ecScalarGetBitValue (const uint32_t *a, int_t index) |
| Get the bit value at the specified index. More...
|
|
int_t | ecScalarComp (const uint32_t *a, const uint32_t *b, uint_t n) |
| Compare integers. More...
|
|
int_t | ecScalarCompInt (const uint32_t *a, uint32_t b, uint_t n) |
| Compare integers. More...
|
|
uint32_t | ecScalarTestEqual (const uint32_t *a, const uint32_t *b, uint_t n) |
| Test if two integers are equal. More...
|
|
uint32_t | ecScalarTestEqualInt (const uint32_t *a, uint32_t b, uint_t n) |
| Test if two integers are equal. More...
|
|
uint32_t | ecScalarTestNotEqual (const uint32_t *a, const uint32_t *b, uint_t n) |
| Test if two integers are different. More...
|
|
uint32_t | ecScalarTestNotEqualInt (const uint32_t *a, uint32_t b, uint_t n) |
| Test if two integers are different. More...
|
|
void | ecScalarSetInt (uint32_t *a, uint32_t b, uint_t n) |
| Set integer value. More...
|
|
void | ecScalarCopy (uint32_t *a, const uint32_t *b, uint_t n) |
| Copy an integer. More...
|
|
void | ecScalarSwap (uint32_t *a, uint32_t *b, uint32_t c, uint_t n) |
| Conditional swap. More...
|
|
void | ecScalarSelect (uint32_t *r, const uint32_t *a, const uint32_t *b, uint32_t c, uint_t n) |
| Select an integer. More...
|
|
error_t | ecScalarRand (const EcCurve *curve, uint32_t *r, const PrngAlgo *prngAlgo, void *prngContext) |
| Generate a random value. More...
|
|
uint32_t | ecScalarAdd (uint32_t *r, const uint32_t *a, const uint32_t *b, uint_t n) |
| Addition of two integers. More...
|
|
uint32_t | ecScalarAddInt (uint32_t *r, const uint32_t *a, uint32_t b, uint_t n) |
| Addition of two integers. More...
|
|
uint32_t | ecScalarSub (uint32_t *r, const uint32_t *a, const uint32_t *b, uint_t n) |
| Subtraction of two integers. More...
|
|
uint32_t | ecScalarSubInt (uint32_t *r, const uint32_t *a, uint32_t b, uint_t n) |
| Subtraction of two integers. More...
|
|
void | ecScalarMul (uint32_t *rl, uint32_t *rh, const uint32_t *a, const uint32_t *b, uint_t n) |
| Multiplication of two integers. More...
|
|
void | ecScalarSqr (uint32_t *r, const uint32_t *a, uint_t n) |
| Squaring operation. More...
|
|
void | ecScalarShiftLeft (uint32_t *r, const uint32_t *a, uint_t k, uint_t n) |
| Left shift operation. More...
|
|
void | ecScalarShiftRight (uint32_t *r, const uint32_t *a, uint_t k, uint_t n) |
| Right shift operation. More...
|
|
void | ecScalarMod (uint32_t *r, const uint32_t *a, uint_t m, const uint32_t *p, uint_t n) |
| Modulo operation. More...
|
|
void | ecScalarAddMod (const EcCurve *curve, uint32_t *r, const uint32_t *a, const uint32_t *b) |
| Modular addition. More...
|
|
void | ecScalarSubMod (const EcCurve *curve, uint32_t *r, const uint32_t *a, const uint32_t *b) |
| Modular subtraction. More...
|
|
void | ecScalarMulMod (const EcCurve *curve, uint32_t *r, const uint32_t *a, const uint32_t *b) |
| Modular multiplication. More...
|
|
void | ecScalarSqrMod (const EcCurve *curve, uint32_t *r, const uint32_t *a) |
| Modular squaring. More...
|
|
void | ecScalarPwr2Mod (const EcCurve *curve, uint32_t *r, const uint32_t *a, uint_t n) |
| Raise an integer to power 2^n. More...
|
|
void | ecScalarInvMod (const EcCurve *curve, uint32_t *r, const uint32_t *a) |
| Modular inversion. More...
|
|
void | ecFieldAddMod (const EcCurve *curve, uint32_t *r, const uint32_t *a, const uint32_t *b) |
| Modular addition. More...
|
|
void | ecFieldSubMod (const EcCurve *curve, uint32_t *r, const uint32_t *a, const uint32_t *b) |
| Modular subtraction. More...
|
|
void | ecFieldMulMod (const EcCurve *curve, uint32_t *r, const uint32_t *a, const uint32_t *b) |
| Modular multiplication. More...
|
|
void | ecFieldSqrMod (const EcCurve *curve, uint32_t *r, const uint32_t *a) |
| Modular squaring. More...
|
|
void | ecFieldPwr2Mod (const EcCurve *curve, uint32_t *r, const uint32_t *a, uint_t n) |
| Raise an integer to power 2^n. More...
|
|
void | ecFieldInvMod (const EcCurve *curve, uint32_t *r, const uint32_t *a) |
| Modular inversion. More...
|
|
void | ecFieldCanonicalize (const EcCurve *curve, uint32_t *r, const uint32_t *a) |
| Reduce non-canonical value. More...
|
|
uint_t | ecTwinMulF (uint_t t) |
| An auxiliary function for the twin multiplication. More...
|
|
void | ecZaddu (EcState *state, EcPoint3 *r, EcPoint3 *s, const EcPoint3 *p, const EcPoint3 *q) |
| Co-Z addition with update. More...
|
|
void | ecZaddc (EcState *state, EcPoint3 *r, EcPoint3 *s, const EcPoint3 *p, const EcPoint3 *q) |
| Conjugate co-Z addition. More...
|
|
void | ecDblu (EcState *state, EcPoint3 *r, EcPoint3 *s, const EcPoint3 *p) |
| Co-Z doubling with update. More...
|
|
void | ecTplu (EcState *state, EcPoint3 *r, EcPoint3 *s, const EcPoint3 *p) |
| Co-Z tripling with update. More...
|
|
void | ecScalarDump (FILE *stream, const char_t *prepend, const uint32_t *a, uint_t n) |
| Display the contents of an integer. More...
|
|
Helper routines for ECC.
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.
- Author
- Oryx Embedded SARL (www.oryx-embedded.com)
- Version
- 2.5.0
Definition in file ec_misc.h.