Supported PKA operation codes and the corresponding required virtual register configurations.
| OPCODE | Operation |
|---|---|
| Terminate | Terminate ongoing PKA operation |
| AddInc |
Add or Increment
|
| SubDecNeg |
Subtract, Decrement, or Negate
|
| ModAddInc |
Modular Add or Modular Increment
|
| ModSubDecNeg |
Modular Subtract, Modular Decrement, or Modular Negate
|
| ANDTST0CLR0 |
And, Test bit 0, or Clear
|
| ORCOPYSET0 |
Or, Copy, or Set bit 0
|
| XORFLP0INVCMP |
XOR, Flip bit 0, Invert, or Compare
|
| SHR0 |
Shift right 0. This operation performs a logical right shift on the contents of
|
| SHR1 | Shift right 1. This operation performs a logical right shift on the contents of
REG_A by a specified number of bit positions and stores the
result in REG_R. The leftmost bits of REG_R that
are vacated by the shift operation are filled with ones.
|
| SHL0 | Shift left 0. This operation performs a logical left shift on the contents of
REG_A by a specified number of bit positions and stores the
result in REG_R. The leftmost bits of REG_R that
are vacated by the shift operation are filled with zeros.
|
| SHL1 | Shift left 1. This operation performs a logical left shift on the contents of
REG_A by a specified number of bit positions and stores the
result in REG_R. The leftmost bits of REG_R that
are vacated by the shift operation are filled with ones.
|
| MulLow | Multiply Low. This operation performs a multiplication of the values in
REG_A and REG_B and stores the result in the
destination register REG_R. Any bits of the product that exceed the
operand size are discarded, effectively keeping only the least significant bits
(LSBs) that fit within the operand size.
|
| ModMul | Modular Multiply. REG_R = (REG_A * REG_B) % REG_N
|
| ModMulN |
The output of this operation is a number that is potentially larger than the
modulus |
| ModExp | Modular Exponentiation. REG_R = (REG_A ^ REG_B) % REG_N
|
| Division |
Integer Division. This operation performs integer division of the value in
If Note: PKA division operations with operands larger than 4K bits return erroneous results.
|
| ModInv | Modular Inversion.
|
| ModDiv |
Modular division is done by calculating the modular inverse of the divisor, check that the inverse value exists by examining the GCD, and then use modular multiplication to multiply the inverse result by the divided.
|
| MulHigh | Multiply High. This operation multiplies REG_A by
REG_B and captures the high-order bits of the result that exceed
the operand size. It places these significant bits, along with an additional
PKA_WORD number of bits, into the destination register
REG_R.
|
| ModMLAC | Modular Multiplication Acceleration. Performs a modular multiplication and
addition. REG_R = ((REG_A * REG_B) + REG_C) % REG_N |
| ModMLACNR |
Modular Multiplication Acceleration No Reduction. Same as ModMLAC, but this omits the final reduction of the result. |
| Reduction |
Reduction. This operation performs a modular reduction, where the result
|