ec_misc.h File Reference

Helper routines for ECC. More...

#include "core/crypto.h"
#include "ecc/ec.h"

Go to the source code of this file.

Enumerations

enum  EcScalarFormat { EC_SCALAR_FORMAT_LITTLE_ENDIAN = 0, EC_SCALAR_FORMAT_BIG_ENDIAN = 1 }
 Scalar import/export format. More...
 

Functions

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...
 

Detailed Description

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.

Enumeration Type Documentation

◆ EcScalarFormat

Scalar import/export format.

Enumerator
EC_SCALAR_FORMAT_LITTLE_ENDIAN 
EC_SCALAR_FORMAT_BIG_ENDIAN 

Definition at line 48 of file ec_misc.h.

Function Documentation

◆ ecDblu()

void ecDblu ( EcState state,
EcPoint3 r,
EcPoint3 s,
const EcPoint3 p 
)

Co-Z doubling with update.

Parameters
[in]statePointer to the working state
[out]rOutput integer R
[out]sOutput integer S
[in]pOutput integer P

Definition at line 1625 of file ec_misc.c.

◆ ecFieldAddMod()

void ecFieldAddMod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a,
const uint32_t *  b 
)

Modular addition.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = (A + B) mod p
[in]aAn integer such as 0 <= A < p
[in]bAn integer such as 0 <= B < p

Definition at line 1235 of file ec_misc.c.

◆ ecFieldCanonicalize()

void ecFieldCanonicalize ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a 
)

Reduce non-canonical value.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = A mod p
[in]aInput integer

Definition at line 1405 of file ec_misc.c.

◆ ecFieldInvMod()

void ecFieldInvMod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a 
)

Modular inversion.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = A^-1 mod p
[in]aAn integer such as 0 <= A < p

Definition at line 1354 of file ec_misc.c.

◆ ecFieldMulMod()

void ecFieldMulMod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a,
const uint32_t *  b 
)

Modular multiplication.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = (A * B) mod p
[in]aAn integer such as 0 <= A < p
[in]bAn integer such as 0 <= B < p

Definition at line 1286 of file ec_misc.c.

◆ ecFieldPwr2Mod()

void ecFieldPwr2Mod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a,
uint_t  n 
)

Raise an integer to power 2^n.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = (A ^ (2^n)) mod p
[in]aAn integer such as 0 <= A < p
[in]nAn integer such as n >= 1

Definition at line 1331 of file ec_misc.c.

◆ ecFieldSqrMod()

void ecFieldSqrMod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a 
)

Modular squaring.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = A^2 mod p
[in]aAn integer such as 0 <= A < p

Definition at line 1308 of file ec_misc.c.

◆ ecFieldSubMod()

void ecFieldSubMod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a,
const uint32_t *  b 
)

Modular subtraction.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = (A - B) mod p
[in]aAn integer such as 0 <= A < p
[in]bAn integer such as 0 <= B < p

Definition at line 1261 of file ec_misc.c.

◆ ecScalarAdd()

uint32_t ecScalarAdd ( uint32_t *  r,
const uint32_t *  a,
const uint32_t *  b,
uint_t  n 
)

Addition of two integers.

Parameters
[out]rResulting integer R = A + B
[in]aAn integer such as 0 <= A < (2^32)^n
[in]bAn integer such as 0 <= B < (2^32)^n
[in]nSize of the operands, in words
Returns
Value of the carry bit

Definition at line 651 of file ec_misc.c.

◆ ecScalarAddInt()

uint32_t ecScalarAddInt ( uint32_t *  r,
const uint32_t *  a,
uint32_t  b,
uint_t  n 
)

Addition of two integers.

Parameters
[out]rResulting integer R = A + B
[in]aAn integer such as 0 <= A < (2^32)^n
[in]bAn integer such as 0 <= B < (2^32 - 1)
[in]nSize of the operands, in words
Returns
Value of the carry bit

Definition at line 680 of file ec_misc.c.

◆ ecScalarAddMod()

void ecScalarAddMod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a,
const uint32_t *  b 
)

Modular addition.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = (A + B) mod q
[in]aAn integer such as 0 <= A < q
[in]bAn integer such as 0 <= B < q

Definition at line 1062 of file ec_misc.c.

◆ ecScalarComp()

int_t ecScalarComp ( const uint32_t *  a,
const uint32_t *  b,
uint_t  n 
)

Compare integers.

Parameters
[in]aPointer to the first integer
[in]bPointer to the second integer
[in]nSize of the integers, in words
Returns
Comparison result

Definition at line 337 of file ec_misc.c.

◆ ecScalarCompInt()

int_t ecScalarCompInt ( const uint32_t *  a,
uint32_t  b,
uint_t  n 
)

Compare integers.

Parameters
[in]aPointer to the first integer
[in]bAn integer such as 0 <= B < (2^32 - 1)
[in]nSize of the integers, in words
Returns
Comparison result

Definition at line 374 of file ec_misc.c.

◆ ecScalarCopy()

void ecScalarCopy ( uint32_t *  a,
const uint32_t *  b,
uint_t  n 
)

Copy an integer.

Parameters
[out]aPointer to the destination integer
[in]bPointer to the source integer
[in]nSize of the integers, in words

Definition at line 527 of file ec_misc.c.

◆ ecScalarDump()

void ecScalarDump ( FILE *  stream,
const char_t prepend,
const uint32_t *  a,
uint_t  n 
)

Display the contents of an integer.

Parameters
[in]streamPointer to a FILE object that identifies an output stream
[in]prependString to prepend to the left of each line
[in]aPointer to the integer to dump
[in]nSize of the integer, in words

Definition at line 1717 of file ec_misc.c.

◆ ecScalarExport()

error_t ecScalarExport ( const uint32_t *  a,
uint_t  n,
uint8_t *  output,
size_t  length,
EcScalarFormat  format 
)

Integer to octet string conversion.

Parameters
[in]aInteger to be converted
[in]nSize of the integer, in words
[out]outputOctet string resulting from the conversion
[in]lengthIntended length of the resulting octet string
[in]formatOutput format
Returns
Error code

Definition at line 150 of file ec_misc.c.

◆ ecScalarGetBitLength()

uint_t ecScalarGetBitLength ( const uint32_t *  a,
uint_t  n 
)

Get the actual length in bits.

Parameters
[in]aPointer to an integer
[in]nSize of the integer, in words
Returns
The actual bit count

Definition at line 273 of file ec_misc.c.

◆ ecScalarGetBitValue()

uint32_t ecScalarGetBitValue ( const uint32_t *  a,
int_t  index 
)

Get the bit value at the specified index.

Parameters
[in]aPointer to an integer
[in]indexPosition where to read the bit
Returns
The actual bit value

Definition at line 315 of file ec_misc.c.

◆ ecScalarGetByteLength()

uint_t ecScalarGetByteLength ( const uint32_t *  a,
uint_t  n 
)

Get the actual length in bytes.

Parameters
[in]aPointer to an integer
[in]nSize of the integer, in words
Returns
The actual byte count

Definition at line 231 of file ec_misc.c.

◆ ecScalarImport()

error_t ecScalarImport ( uint32_t *  r,
uint_t  n,
const uint8_t *  input,
size_t  length,
EcScalarFormat  format 
)

Octet string to integer conversion.

Parameters
[out]rInteger resulting from the conversion
[in]nSize of the integer, in words
[in]inputOctet string to be converted
[in]lengthLength of the octet string
[in]formatInput format
Returns
Error code

Definition at line 54 of file ec_misc.c.

◆ ecScalarInvMod()

void ecScalarInvMod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a 
)

Modular inversion.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = A^-1 mod q
[in]aAn integer such as 0 <= A < q

Definition at line 1181 of file ec_misc.c.

◆ ecScalarMod()

void ecScalarMod ( uint32_t *  r,
const uint32_t *  a,
uint_t  m,
const uint32_t *  p,
uint_t  n 
)

Modulo operation.

Parameters
[out]rResulting integer R = A mod P
[in]aAn integer such as 0 <= A < (2^32)^m
[in]mSize of integer A, in words
[in]pAn integer such as 0 <= P < (2^32)^n
[in]nSize of integers P and R, in words

Definition at line 1009 of file ec_misc.c.

◆ ecScalarMul()

void ecScalarMul ( uint32_t *  rl,
uint32_t *  rh,
const uint32_t *  a,
const uint32_t *  b,
uint_t  n 
)

Multiplication of two integers.

Parameters
[out]rlLow part of the result R = (A * B) mod (2^32)^n
[out]rhHigh part of the result R = (A * B) / (2^32)^n
[in]aAn integer such as 0 <= A < (2^32)^n
[in]bAn integer such as 0 <= B < (2^32)^n
[in]nSize of the operands, in words

Definition at line 766 of file ec_misc.c.

◆ ecScalarMulMod()

void ecScalarMulMod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a,
const uint32_t *  b 
)

Modular multiplication.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = (A * B) mod q
[in]aAn integer such as 0 <= A < q
[in]bAn integer such as 0 <= B < q

Definition at line 1113 of file ec_misc.c.

◆ ecScalarPwr2Mod()

void ecScalarPwr2Mod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a,
uint_t  n 
)

Raise an integer to power 2^n.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = (A ^ (2^n)) mod q
[in]aAn integer such as 0 <= A < q
[in]nAn integer such as n >= 1

Definition at line 1158 of file ec_misc.c.

◆ ecScalarRand()

error_t ecScalarRand ( const EcCurve curve,
uint32_t *  r,
const PrngAlgo prngAlgo,
void *  prngContext 
)

Generate a random value.

Parameters
[in]curveElliptic curve parameters
[out]rRandom integer in range such as 1 < R < q - 1
[in]prngAlgoPRNG algorithm
[in]prngContextPointer to the PRNG context
Returns
Error code

Definition at line 603 of file ec_misc.c.

◆ ecScalarSelect()

void ecScalarSelect ( uint32_t *  r,
const uint32_t *  a,
const uint32_t *  b,
uint32_t  c,
uint_t  n 
)

Select an integer.

Parameters
[out]rPointer to the destination integer
[in]aPointer to the first source integer
[in]bPointer to the second source integer
[in]cCondition variable
[in]nSize of the integers, in words

Definition at line 576 of file ec_misc.c.

◆ ecScalarSetInt()

void ecScalarSetInt ( uint32_t *  a,
uint32_t  b,
uint_t  n 
)

Set integer value.

Parameters
[out]aPointer to the integer to be initialized
[in]bAn integer such as 0 <= B < (2^32 - 1)
[in]nSize of the integer A, in words

Definition at line 505 of file ec_misc.c.

◆ ecScalarShiftLeft()

void ecScalarShiftLeft ( uint32_t *  r,
const uint32_t *  a,
uint_t  k,
uint_t  n 
)

Left shift operation.

Parameters
[out]rResult R = A << k
[in]aAn integer such as 0 <= A < (2^32)^n
[in]kThe number of bits to shift
[in]nSize of the integer A, in words

Definition at line 884 of file ec_misc.c.

◆ ecScalarShiftRight()

void ecScalarShiftRight ( uint32_t *  r,
const uint32_t *  a,
uint_t  k,
uint_t  n 
)

Right shift operation.

Parameters
[out]rResult R = A >> k
[in]aAn integer such as 0 <= A < (2^32)^n
[in]kThe number of bits to shift
[in]nSize of the integer A, in words

Definition at line 940 of file ec_misc.c.

◆ ecScalarSqr()

void ecScalarSqr ( uint32_t *  r,
const uint32_t *  a,
uint_t  n 
)

Squaring operation.

Parameters
[out]rResult R = A ^ 2
[in]aAn integer such as 0 <= A < (2^32)^n
[in]nSize of the integer A, in words

Definition at line 832 of file ec_misc.c.

◆ ecScalarSqrMod()

void ecScalarSqrMod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a 
)

Modular squaring.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = A^2 mod q
[in]aAn integer such as 0 <= A < q

Definition at line 1135 of file ec_misc.c.

◆ ecScalarSub()

uint32_t ecScalarSub ( uint32_t *  r,
const uint32_t *  a,
const uint32_t *  b,
uint_t  n 
)

Subtraction of two integers.

Parameters
[out]rResulting integer R = A - B
[in]aAn integer such as 0 <= A < (2^32)^n
[in]bAn integer such as 0 <= B < (2^32)^n
[in]nSize of the operands, in words
Returns
1 if the result is negative, else 0

Definition at line 707 of file ec_misc.c.

◆ ecScalarSubInt()

uint32_t ecScalarSubInt ( uint32_t *  r,
const uint32_t *  a,
uint32_t  b,
uint_t  n 
)

Subtraction of two integers.

Parameters
[out]rResulting integer R = A - B
[in]aAn integer such as 0 <= A < (2^32)^n
[in]bAn integer such as 0 <= B < (2^32 - 1)
[in]nSize of the operands, in words
Returns
1 if the result is negative, else 0

Definition at line 736 of file ec_misc.c.

◆ ecScalarSubMod()

void ecScalarSubMod ( const EcCurve curve,
uint32_t *  r,
const uint32_t *  a,
const uint32_t *  b 
)

Modular subtraction.

Parameters
[in]curveElliptic curve parameters
[out]rResulting integer R = (A - B) mod q
[in]aAn integer such as 0 <= A < q
[in]bAn integer such as 0 <= B < q

Definition at line 1088 of file ec_misc.c.

◆ ecScalarSwap()

void ecScalarSwap ( uint32_t *  a,
uint32_t *  b,
uint32_t  c,
uint_t  n 
)

Conditional swap.

Parameters
[in,out]aPointer to the first integer
[in,out]bPointer to the second integer
[in]cCondition variable
[in]nSize of the integers, in words

Definition at line 547 of file ec_misc.c.

◆ ecScalarTestEqual()

uint32_t ecScalarTestEqual ( const uint32_t *  a,
const uint32_t *  b,
uint_t  n 
)

Test if two integers are equal.

Parameters
[in]aPointer to the first integer
[in]bPointer to the second integer
[in]nSize of the integers, in words
Returns
The function returns 1 if the A = B, else 0

Definition at line 420 of file ec_misc.c.

◆ ecScalarTestEqualInt()

uint32_t ecScalarTestEqualInt ( const uint32_t *  a,
uint32_t  b,
uint_t  n 
)

Test if two integers are equal.

Parameters
[in]aPointer to the first integer
[in]bAn integer such as 0 <= B < (2^32 - 1)
[in]nSize of the integers, in words
Returns
The function returns 1 if the A = B, else 0

Definition at line 435 of file ec_misc.c.

◆ ecScalarTestNotEqual()

uint32_t ecScalarTestNotEqual ( const uint32_t *  a,
const uint32_t *  b,
uint_t  n 
)

Test if two integers are different.

Parameters
[in]aPointer to the first integer
[in]bPointer to the second integer
[in]nSize of the integers, in words
Returns
The function returns 1 if the A != B, else 0

Definition at line 450 of file ec_misc.c.

◆ ecScalarTestNotEqualInt()

uint32_t ecScalarTestNotEqualInt ( const uint32_t *  a,
uint32_t  b,
uint_t  n 
)

Test if two integers are different.

Parameters
[in]aPointer to the first integer
[in]bAn integer such as 0 <= B < (2^32 - 1)
[in]nSize of the integers, in words
Returns
The function returns 1 if the A != B, else 0

Definition at line 478 of file ec_misc.c.

◆ ecTplu()

void ecTplu ( EcState state,
EcPoint3 r,
EcPoint3 s,
const EcPoint3 p 
)

Co-Z tripling with update.

Parameters
[in]statePointer to the working state
[out]rOutput integer R
[out]sOutput integer S
[in]pOutput integer P

Definition at line 1700 of file ec_misc.c.

◆ ecTwinMulF()

uint_t ecTwinMulF ( uint_t  t)

An auxiliary function for the twin multiplication.

Parameters
[in]tAn integer T such as 0 <= T <= 31
Returns
Output value

Definition at line 1426 of file ec_misc.c.

◆ ecZaddc()

void ecZaddc ( EcState state,
EcPoint3 r,
EcPoint3 s,
const EcPoint3 p,
const EcPoint3 q 
)

Conjugate co-Z addition.

Parameters
[in]statePointer to the working state
[out]rOutput integer R
[out]sOutput integer S
[in]pOutput integer P
[in]qOutput integer Q

Definition at line 1535 of file ec_misc.c.

◆ ecZaddu()

void ecZaddu ( EcState state,
EcPoint3 r,
EcPoint3 s,
const EcPoint3 p,
const EcPoint3 q 
)

Co-Z addition with update.

Parameters
[in]statePointer to the working state
[out]rOutput integer R
[out]sOutput integer S
[in]pOutput integer P
[in]qOutput integer Q

Definition at line 1466 of file ec_misc.c.