Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MiniTLS-HTTPS-Example
fp_mul_comba_3.c
00001 #define TFM_DEFINES 00002 #include "fp_mul_comba.c" 00003 00004 #ifdef TFM_MUL3 00005 void fp_mul_comba3(fp_int *A, fp_int *B, fp_int *C) 00006 { 00007 fp_digit c0, c1, c2, at[6]; 00008 00009 memcpy(at, A->dp, 3 * sizeof(fp_digit)); 00010 memcpy(at+3, B->dp, 3 * sizeof(fp_digit)); 00011 COMBA_START; 00012 00013 COMBA_CLEAR; 00014 /* 0 */ 00015 MULADD(at[0], at[3]); 00016 COMBA_STORE(C->dp[0]); 00017 /* 1 */ 00018 COMBA_FORWARD; 00019 MULADD(at[0], at[4]); MULADD(at[1], at[3]); 00020 COMBA_STORE(C->dp[1]); 00021 /* 2 */ 00022 COMBA_FORWARD; 00023 MULADD(at[0], at[5]); MULADD(at[1], at[4]); MULADD(at[2], at[3]); 00024 COMBA_STORE(C->dp[2]); 00025 /* 3 */ 00026 COMBA_FORWARD; 00027 MULADD(at[1], at[5]); MULADD(at[2], at[4]); 00028 COMBA_STORE(C->dp[3]); 00029 /* 4 */ 00030 COMBA_FORWARD; 00031 MULADD(at[2], at[5]); 00032 COMBA_STORE(C->dp[4]); 00033 COMBA_STORE2(C->dp[5]); 00034 C->used = 6; 00035 C->sign = A->sign ^ B->sign; 00036 fp_clamp(C); 00037 COMBA_FINI; 00038 } 00039 #endif
Generated on Wed Jul 13 2022 00:22:54 by
1.7.2
