FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/ge_448.c
/* Convert point to byte array assuming projective ordinates.
 *
 * b  [in]  Array of bytes to hold compressed point.
 * p  [in]  Point to convert.
 */
Convert point to byte array assuming projective ordinates.
b  [in]  Array of bytes to hold compressed point.
p  [in]  Point to convert.
Convert point to byte array assuming projective ordinates . b [ in ] Array of bytes to hold compressed point . p [ in ] Point to convert .
void ge448_to_bytes(uint8_t *b, const ge448_p2 *p)
{
    ge448 recip[GE448_WORDS];
    ge448 x[GE448_WORDS];
    ge448 y[GE448_WORDS];
    fe448_invert(recip, p->Z);
    fe448_mul(x, p->X, recip);
    fe448_mul(y, p->Y, recip);
    fe448_to_bytes(b, y);
    b[56] = fe448_isnegative(x) << 7;
}
void ge448_to_bytes ( uint8_t * b , const ge448_p2 * p ) { ge448 recip [ GE448_WORDS ] ; ge448 x [ GE448_WORDS ] ; ge448 y [ GE448_WORDS ] ; fe448_invert ( recip , p -> Z ) ; fe448_mul ( x , p -> X , recip ) ; fe448_mul ( y , p -> Y , recip ) ; fe448_to_bytes ( b , y ) ; b [ 56 ] = fe448_isnegative ( x ) << 7 ; }
Convert point to byte array assuming projective ordinates.
Convert point to byte array assuming projective ordinates .