FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/fe_448.c
/* Mulitply a field element by 39081. r = (39081 * a) mod (2^448 - 2^224 - 1)
 *
 * r  [in]  Field element to hold result.
 * a  [in]  Field element to multiply.
 */
Mulitply a field element by 39081.
Mulitply a field element by 39081 .
void fe448_mul39081(uint8_t* r, const uint8_t* a)
{
    int i;
    int32_t c = 0;
    int32_t o = 0;
    for (i = 0; i < 56; i++) {
        c += a[i] * (int32_t)39081;
        r[i] = (uint8_t)c;
        c >>= 8;
    }
    for (i = 0; i < 56; i++) {
        if ((i == 0) || (i == 28)) o += c;
        o += r[i];
        r[i] = (uint8_t)o;
        o >>= 8;
    }
}
void fe448_mul39081 ( uint8_t * r , const uint8_t * a ) { int i ; int32_t c = 0 ; int32_t o = 0 ; for ( i = 0 ; i < 56 ; i ++ ) { c += a [ i ] * ( int32_t ) 39081 ; r [ i ] = ( uint8_t ) c ; c >>= 8 ; } for ( i = 0 ; i < 56 ; i ++ ) { if ( ( i == 0 ) || ( i == 28 ) ) o += c ; o += r [ i ] ; r [ i ] = ( uint8_t ) o ; o >>= 8 ; } }
Mulitply a field element by 39081. r = (39081 * a) mod (2^448 - 2^224 - 1)
 r  [in]  Field element to hold result.
Mulitply a field element by 39081 . r = ( 39081 * a ) mod ( 2^448 - 2^224 - 1 ) r [ in ] Field element to hold result .