Matrix Multiply Accumulate Instruction for Groestl Hashing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional systems using AES instructions are inefficient in performing the MixBytes transformation of the Groestl Secure Hashing algorithm, requiring numerous cycles and operations due to the complexity of Galois Field (GF) multiplications and XOR operations.

Innovation Solution

The implementation of a new instruction, MAC_BYTE_MATRIX_GF2, which performs a matrix multiply accumulate operation to accelerate the MixBytes transformation by processing each row of the state matrix independently with circulant constants, reducing the number of cycles required for the transformation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional AES instructions are used to perform MixBytes transformation, then the transformation can be completed, but the cycle count is high (60 cycles) due to complex GF multiplications and XOR operations

Engineering Contradiction:
Improvecycle count for MixBytes operationVSAvoidcomplexity of GF multiplications and XOR operations
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent combines multiple GF(2^8) multiplication operations and XOR operations into a single matrix multiply-accumulate instruction. The instruction performs the MixBytes transformation by multiplying a state matrix with a circulant key matrix and accumulating the results, reducing 60 separate cycles into one atomic operation that completes in 4 cycles.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The matrix multiply-accumulate instruction is designed to perform multiple cryptographic operations simultaneously - it handles both the multiplication by circulant constants and the accumulation with the state matrix in a single instruction. This multi-functional approach eliminates the need for separate instructions for each operation, significantly reducing the total cycle count.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Reliability

If numerous GF multiplications and XOR operations are performed sequentially, then the MixBytes transformation is completed correctly, but the processing time increases significantly

Engineering Contradiction:
Improvecorrectness of MixBytes transformationVSAvoidprocessing time for MixBytes operation
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The circulant key matrix is pre-computed from the key material before the actual transformation. This preliminary preparation allows the MixBytes operation to proceed with simple matrix multiply-accumulate instructions rather than performing complex GF multiplications during the transformation itself, reducing processing time while maintaining correctness.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent replaces the sequential mechanical execution of multiple GF multiplication and XOR instructions with a single optimized matrix multiply-accumulate operation. This substitution maintains the mathematical correctness of the transformation while dramatically reducing the number of operational steps required, thereby reducing processing time.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS9960917B2Matrix multiply accumulate instruction
Publication Date: 2018.05.01 INTEL CORP
  • US9960917B2 patent drawing
  • US9960917B2 patent drawing
  • US9960917B2 patent drawing

AI summary

A method is described. The method includes iteratively performing for each position in a result matrix stored in a third register, multiplying a value at a matrix position stored in a first register with a value at a matrix position stored in a second register to obtain a first multiplicative value, where the positions in the first register and the second register are determined by the position in the result matrix and performing an exclusive or (XOR) operation with the first multiplicative value and a value stored at a result matrix position stored in the third register to obtain a result value.