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(int64_t* r, const int64_t* a)
{
    int128_t t;
    int64_t o;
    int128_t t0 = a[0] * (int128_t)39081;
    int128_t t1 = a[1] * (int128_t)39081;
    int128_t t2 = a[2] * (int128_t)39081;
    int128_t t3 = a[3] * (int128_t)39081;
    int128_t t4 = a[4] * (int128_t)39081;
    int128_t t5 = a[5] * (int128_t)39081;
    int128_t t6 = a[6] * (int128_t)39081;
    int128_t t7 = a[7] * (int128_t)39081;
    o = (int64_t)(t0  >> 56); t1  += o; t = (int128_t)o << 56; t0  -= t;
    o = (int64_t)(t1  >> 56); t2  += o; t = (int128_t)o << 56; t1  -= t;
    o = (int64_t)(t2  >> 56); t3  += o; t = (int128_t)o << 56; t2  -= t;
    o = (int64_t)(t3  >> 56); t4  += o; t = (int128_t)o << 56; t3  -= t;
    o = (int64_t)(t4  >> 56); t5  += o; t = (int128_t)o << 56; t4  -= t;
    o = (int64_t)(t5  >> 56); t6  += o; t = (int128_t)o << 56; t5  -= t;
    o = (int64_t)(t6  >> 56); t7  += o; t = (int128_t)o << 56; t6  -= t;
    o = (int64_t)(t7  >> 56); t0  += o;
                   t4  += o; t = (int128_t)o << 56; t7  -= t;
    r[0] = (int64_t)t0;
    r[1] = (int64_t)t1;
    r[2] = (int64_t)t2;
    r[3] = (int64_t)t3;
    r[4] = (int64_t)t4;
    r[5] = (int64_t)t5;
    r[6] = (int64_t)t6;
    r[7] = (int64_t)t7;
}
void fe448_mul39081 ( int64_t * r , const int64_t * a ) { int128_t t ; int64_t o ; int128_t t0 = a [ 0 ] * ( int128_t ) 39081 ; int128_t t1 = a [ 1 ] * ( int128_t ) 39081 ; int128_t t2 = a [ 2 ] * ( int128_t ) 39081 ; int128_t t3 = a [ 3 ] * ( int128_t ) 39081 ; int128_t t4 = a [ 4 ] * ( int128_t ) 39081 ; int128_t t5 = a [ 5 ] * ( int128_t ) 39081 ; int128_t t6 = a [ 6 ] * ( int128_t ) 39081 ; int128_t t7 = a [ 7 ] * ( int128_t ) 39081 ; o = ( int64_t ) ( t0 >> 56 ) ; t1 += o ; t = ( int128_t ) o << 56 ; t0 -= t ; o = ( int64_t ) ( t1 >> 56 ) ; t2 += o ; t = ( int128_t ) o << 56 ; t1 -= t ; o = ( int64_t ) ( t2 >> 56 ) ; t3 += o ; t = ( int128_t ) o << 56 ; t2 -= t ; o = ( int64_t ) ( t3 >> 56 ) ; t4 += o ; t = ( int128_t ) o << 56 ; t3 -= t ; o = ( int64_t ) ( t4 >> 56 ) ; t5 += o ; t = ( int128_t ) o << 56 ; t4 -= t ; o = ( int64_t ) ( t5 >> 56 ) ; t6 += o ; t = ( int128_t ) o << 56 ; t5 -= t ; o = ( int64_t ) ( t6 >> 56 ) ; t7 += o ; t = ( int128_t ) o << 56 ; t6 -= t ; o = ( int64_t ) ( t7 >> 56 ) ; t0 += o ; t4 += o ; t = ( int128_t ) o << 56 ; t7 -= t ; r [ 0 ] = ( int64_t ) t0 ; r [ 1 ] = ( int64_t ) t1 ; r [ 2 ] = ( int64_t ) t2 ; r [ 3 ] = ( int64_t ) t3 ; r [ 4 ] = ( int64_t ) t4 ; r [ 5 ] = ( int64_t ) t5 ; r [ 6 ] = ( int64_t ) t6 ; r [ 7 ] = ( int64_t ) t7 ; }
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 .
/* Store */