STDA045 November   2026 MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G1518 , MSPM0G1519 , MSPM0G3505 , MSPM0G3506 , MSPM0G3507 , MSPM0G3518 , MSPM0G3519

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2ED25519PH Algorithm Introduction
  6. 3MSPM0G Math Accelerator (MATHACL)
    1. 3.1 MATHACL Module
    2. 3.2 Multiply-Accumulate (MAC) Operation
  7. 4Accelerate the ED25519PH Algorithm by Using MATHACL
    1. 4.1 Loop Unrolled Implementation
      1. 4.1.1 Non-MATHACL Optimization
      2. 4.1.2 MATHACL Optimization
    2. 4.2 Loop Rolled Implementation
      1. 4.2.1 Non-MATHACL Optimization
      2. 4.2.2 MATHACL Optimization
    3. 4.3 Benchmark
  8. 5Summary
  9. 6References

Accelerate the ED25519PH Algorithm by Using MATHACL

Based on the Radix-25.5 implementation, the fe25519_mul routine (implemented in ed25519_ref10_fe_25_5.h of the example code) uses an optimized schoolbook multiplication. Partial products are accumulated directly into ten 64-bit temporary variables, avoiding large multi-precision intermediate buffers.

Using the identity 2255 ≡ 19 (mod p), terms that exceed bit 255 are immediately folded back into lower limbs. Therefore, the implementation combines multiplication and modular reduction into a single operation.

The argument definition of fe25519_mul(fe25519 h, const fe25519 f, const fe25519 g):

  • h: Multiplication output, int32[10] format
  • f: Multiplication input, int32[10] format, where f0 represents f[0]
  • g: Multiplication input, int32[10] format, where g0 represents g[0]