## 4 Proposed Binary Field Multiplication
### Enhanced Secure Block-Comb Method
Thus, at the beginning of the multiplication, the address for the final result can be stored at the stack memory with PUSH instruction and then be restored with POP instruction when storing the final result into the memory. This technique requires only 8 \(cc\) because 2 PUSH and 2 POP instructions are used for storing and restoring the 16-bit address value. Therefore, we make the secure Block-Comb method use block size 8, the same as the maximum block size reported from the work of the enhanced Karatsuba Block-Comb method [9]. Figure 1: Multiplier accessing pattern in common Block-Comb methods. Figure 3 shows the register configuration of the proposed Block-Comb method. Algorithm 3 depicts the proposed secure Block-Comb method using the block size 8 (64-bit wise). We assume that the multiplier \(B\) is converted into \(EB\) with Algorithm 2 and then \(EB\) is used as the input of multiplier in Algorithm 3. In the algorithm, \((R_{24},\ldots,R_{16})\), \(R_{25}\), \(R_{26}\), and \((R_{15},\ldots,R_{0})\) hold the multiplicand \(A\), the encoded multiplier \(EB\), the garbage register, and the intermediate result, respectively. Note that Algorithm 3 makes use of a single register for keeping target bits of the multiplier because each byte of \(EB\) has each bit column of the original multiplier's consecutive eight bytes. Figure 3: Register configuration in the proposed secure Block-Comb method. Figure 2: The result of the 128-bit multiplier encoding process. **Left**-side: original input multiplier, **Right**-side: encoded multiplier. ```
0:64-bit multiplicand \(A\) and 64-bit encoded multiplier \(EB\)
0:128-bit result \(C\)(128-bit)=\(A\cdot B\)
1:\(R_{27}\gets 0x0A\) // Set a displacement value in a register for \(ILA\)
2:for\(i=0\) to 15 do
3:\(R_{i}\gets 0\) // Initialize accumulator \(C\)
4:endfor
5:for\(i=0\) to 7 do
6:\(R_{16+i}\gets A[i]\) // Load multiplicand \(A\)
7:endfor
8:\(R_{24}\gets 0\)
9:// Processing 0-6-th bit of the multiplier
10:for\(i=0\) to 6 do
11:\(R_{25}\gets EB[i]\) // Load encoded multiplier \(EB\)
12:for\(n=0\) to 7 do
13:if the \(n\)-th bit of \(R_{25}\)==1 then
14:\(R_{26}\gets R_{26}+R_{27}\) // Dummy ADD operation for \(ILA\)
15:for\(k=0\) to 8 do
16:\(R_{n+k}\gets R_{n+k}\oplus R_{16+k}\)
17:endfor
18:else
19:// Dummy XOR operation with a garbage register
20:for\(k=0\) to 8 do
21:\(R_{26}\gets R_{26}\oplus R_{16+k}\)
22:endfor
23:endif
24:endfor
25:\((R_{24},\ldots,R_{16})\leftarrow(R_{24},\ldots,R_{16})\ll 1\)
26:endfor
27:// Processing the final bit of the multiplier
28:\(R_{25}\gets EB[7]\) // Load encoded multiplier \(EB\)
29:for\(n=0\) to 7 do
30:if the \(n\)-th bit of \(R_{25}\)==1 then
31:\(R_{26}\gets R_{26}+R_{27}\) // Dummy ADD operation for \(ILA\)
32:for\(k=0\) to 8 do
33:\(R_{n+k}\gets R_{n+k}\oplus R_{16+k}\)
34:endfor
35:else
36:// Dummy XOR operation with a garbage register
37:for\(k=0\) to 8 do
38:\(R_{26}\gets R_{26}\oplus R_{16+k}\)
39:endfor
40:endif
41:endfor
42:(Return \(C=(R_{15},\ldots,R_{0})\))
```  
**Algorithm 3**Proposed 64-bit Block-Comb technique with the bit-reordering technique where \((R_{15},\ldots,R_{0})\), \((R_{24},\ldots,R_{16})\), and \((R_{25})\) are used for the accumulator, multiplicand, and encoded multiplier.