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(int32_t* r, const int32_t* a)
{
    int64_t t;
    int32_t o;
    int64_t t0 = a[0] * (int64_t)39081;
    int64_t t1 = a[1] * (int64_t)39081;
    int64_t t2 = a[2] * (int64_t)39081;
    int64_t t3 = a[3] * (int64_t)39081;
    int64_t t4 = a[4] * (int64_t)39081;
    int64_t t5 = a[5] * (int64_t)39081;
    int64_t t6 = a[6] * (int64_t)39081;
    int64_t t7 = a[7] * (int64_t)39081;
    int64_t t8 = a[8] * (int64_t)39081;
    int64_t t9 = a[9] * (int64_t)39081;
    int64_t t10 = a[10] * (int64_t)39081;
    int64_t t11 = a[11] * (int64_t)39081;
    int64_t t12 = a[12] * (int64_t)39081;
    int64_t t13 = a[13] * (int64_t)39081;
    int64_t t14 = a[14] * (int64_t)39081;
    int64_t t15 = a[15] * (int64_t)39081;
    o = (int32_t)(t0  >> 28); t1  += o; t = (int64_t)o << 28; t0  -= t;
    o = (int32_t)(t1  >> 28); t2  += o; t = (int64_t)o << 28; t1  -= t;
    o = (int32_t)(t2  >> 28); t3  += o; t = (int64_t)o << 28; t2  -= t;
    o = (int32_t)(t3  >> 28); t4  += o; t = (int64_t)o << 28; t3  -= t;
    o = (int32_t)(t4  >> 28); t5  += o; t = (int64_t)o << 28; t4  -= t;
    o = (int32_t)(t5  >> 28); t6  += o; t = (int64_t)o << 28; t5  -= t;
    o = (int32_t)(t6  >> 28); t7  += o; t = (int64_t)o << 28; t6  -= t;
    o = (int32_t)(t7  >> 28); t8  += o; t = (int64_t)o << 28; t7  -= t;
    o = (int32_t)(t8  >> 28); t9  += o; t = (int64_t)o << 28; t8  -= t;
    o = (int32_t)(t9  >> 28); t10 += o; t = (int64_t)o << 28; t9  -= t;
    o = (int32_t)(t10 >> 28); t11 += o; t = (int64_t)o << 28; t10 -= t;
    o = (int32_t)(t11 >> 28); t12 += o; t = (int64_t)o << 28; t11 -= t;
    o = (int32_t)(t12 >> 28); t13 += o; t = (int64_t)o << 28; t12 -= t;
    o = (int32_t)(t13 >> 28); t14 += o; t = (int64_t)o << 28; t13 -= t;
    o = (int32_t)(t14 >> 28); t15 += o; t = (int64_t)o << 28; t14 -= t;
    o = (int32_t)(t15 >> 28); t0  += o;
                   t8  += o; t = (int64_t)o << 28; t15 -= t;
    r[0] = (int32_t)t0;
    r[1] = (int32_t)t1;
    r[2] = (int32_t)t2;
    r[3] = (int32_t)t3;
    r[4] = (int32_t)t4;
    r[5] = (int32_t)t5;
    r[6] = (int32_t)t6;
    r[7] = (int32_t)t7;
    r[8] = (int32_t)t8;
    r[9] = (int32_t)t9;
    r[10] = (int32_t)t10;
    r[11] = (int32_t)t11;
    r[12] = (int32_t)t12;
    r[13] = (int32_t)t13;
    r[14] = (int32_t)t14;
    r[15] = (int32_t)t15;
}
void fe448_mul39081 ( int32_t * r , const int32_t * a ) { int64_t t ; int32_t o ; int64_t t0 = a [ 0 ] * ( int64_t ) 39081 ; int64_t t1 = a [ 1 ] * ( int64_t ) 39081 ; int64_t t2 = a [ 2 ] * ( int64_t ) 39081 ; int64_t t3 = a [ 3 ] * ( int64_t ) 39081 ; int64_t t4 = a [ 4 ] * ( int64_t ) 39081 ; int64_t t5 = a [ 5 ] * ( int64_t ) 39081 ; int64_t t6 = a [ 6 ] * ( int64_t ) 39081 ; int64_t t7 = a [ 7 ] * ( int64_t ) 39081 ; int64_t t8 = a [ 8 ] * ( int64_t ) 39081 ; int64_t t9 = a [ 9 ] * ( int64_t ) 39081 ; int64_t t10 = a [ 10 ] * ( int64_t ) 39081 ; int64_t t11 = a [ 11 ] * ( int64_t ) 39081 ; int64_t t12 = a [ 12 ] * ( int64_t ) 39081 ; int64_t t13 = a [ 13 ] * ( int64_t ) 39081 ; int64_t t14 = a [ 14 ] * ( int64_t ) 39081 ; int64_t t15 = a [ 15 ] * ( int64_t ) 39081 ; o = ( int32_t ) ( t0 >> 28 ) ; t1 += o ; t = ( int64_t ) o << 28 ; t0 -= t ; o = ( int32_t ) ( t1 >> 28 ) ; t2 += o ; t = ( int64_t ) o << 28 ; t1 -= t ; o = ( int32_t ) ( t2 >> 28 ) ; t3 += o ; t = ( int64_t ) o << 28 ; t2 -= t ; o = ( int32_t ) ( t3 >> 28 ) ; t4 += o ; t = ( int64_t ) o << 28 ; t3 -= t ; o = ( int32_t ) ( t4 >> 28 ) ; t5 += o ; t = ( int64_t ) o << 28 ; t4 -= t ; o = ( int32_t ) ( t5 >> 28 ) ; t6 += o ; t = ( int64_t ) o << 28 ; t5 -= t ; o = ( int32_t ) ( t6 >> 28 ) ; t7 += o ; t = ( int64_t ) o << 28 ; t6 -= t ; o = ( int32_t ) ( t7 >> 28 ) ; t8 += o ; t = ( int64_t ) o << 28 ; t7 -= t ; o = ( int32_t ) ( t8 >> 28 ) ; t9 += o ; t = ( int64_t ) o << 28 ; t8 -= t ; o = ( int32_t ) ( t9 >> 28 ) ; t10 += o ; t = ( int64_t ) o << 28 ; t9 -= t ; o = ( int32_t ) ( t10 >> 28 ) ; t11 += o ; t = ( int64_t ) o << 28 ; t10 -= t ; o = ( int32_t ) ( t11 >> 28 ) ; t12 += o ; t = ( int64_t ) o << 28 ; t11 -= t ; o = ( int32_t ) ( t12 >> 28 ) ; t13 += o ; t = ( int64_t ) o << 28 ; t12 -= t ; o = ( int32_t ) ( t13 >> 28 ) ; t14 += o ; t = ( int64_t ) o << 28 ; t13 -= t ; o = ( int32_t ) ( t14 >> 28 ) ; t15 += o ; t = ( int64_t ) o << 28 ; t14 -= t ; o = ( int32_t ) ( t15 >> 28 ) ; t0 += o ; t8 += o ; t = ( int64_t ) o << 28 ; t15 -= t ; r [ 0 ] = ( int32_t ) t0 ; r [ 1 ] = ( int32_t ) t1 ; r [ 2 ] = ( int32_t ) t2 ; r [ 3 ] = ( int32_t ) t3 ; r [ 4 ] = ( int32_t ) t4 ; r [ 5 ] = ( int32_t ) t5 ; r [ 6 ] = ( int32_t ) t6 ; r [ 7 ] = ( int32_t ) t7 ; r [ 8 ] = ( int32_t ) t8 ; r [ 9 ] = ( int32_t ) t9 ; r [ 10 ] = ( int32_t ) t10 ; r [ 11 ] = ( int32_t ) t11 ; r [ 12 ] = ( int32_t ) t12 ; r [ 13 ] = ( int32_t ) t13 ; r [ 14 ] = ( int32_t ) t14 ; r [ 15 ] = ( int32_t ) t15 ; }
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 */