Skip to content

v0.36.1

Latest

Choose a tag to compare

@nugaon nugaon released this 24 Jul 12:10
0e11440

SHA3 Keccak-256 State Operations

Overview

This is a forked version of library golang.org/x/crypto.

Enhanced the SHA3 Keccak-256 implementation with state export/import functionality to allow:

  • Exporting internal hash state
  • Creating new hash instances with a specific initial state
  • Importing state into existing hash instances

Key Features

  • New Interface: StatefulHash extends hash.Hash with state operations
  • New Constructor: NewLegacyKeccak256WithState(state) creates hash with optional initial state
  • State Methods: ExportStateand ImportState for state management
  • Backward Compatible: Original NewLegacyKeccak256 function unchanged

Use Cases

  • Checkpointing hash operations
  • Parallel processing of hash computations
  • State persistence across sessions
  • Reproducible hash states for testing