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 *s, const ge448_p2 *h)
{
    ge448 recip[56];
    ge448 x[56];
    fe448_invert(recip, h->Z);
    fe448_mul(x, h->X, recip);
    fe448_mul(s, h->Y, recip);
    fe448_norm(x);
    fe448_norm(s);
    s[56] = (x[0] & 1) << 7;
}
void ge448_to_bytes ( uint8_t * s , const ge448_p2 * h ) { ge448 recip [ 56 ] ; ge448 x [ 56 ] ; fe448_invert ( recip , h -> Z ) ; fe448_mul ( x , h -> X , recip ) ; fe448_mul ( s , h -> Y , recip ) ; fe448_norm ( x ) ; fe448_norm ( s ) ; s [ 56 ] = ( x [ 0 ] & 1 ) << 7 ; }
Convert point to byte array assuming projective ordinates.
Convert point to byte array assuming projective ordinates .