Skip to content

Pad_xB_1

Snoopy87 edited this page Aug 16, 2018 · 2 revisions

Overview

This padding algorithm works in byte and it is used by SHA3 and works as follow :

  1. Add a the specific byte at the end of the message
  2. Add as sequence of 0 until the end of the block
  3. Add 0x80 at the end of the block

Core available

  • HashPadding_Std uses the PaddingIO interface.

Measure

Core Target Performance Aera RAM
*_Std Altera Cyclone V (C6) - - -

Example

import spinal.crypto.padding.{HashPadding_Config, HashPadding_Std}

val config = Padding_xB_1_Config(
    dataInWidth  = 32 bits ,
    dataOutWidth = 576 bits,
    pad_xB       = 0x06
  )

val padding = new Pad_xB_1_Std(config)
padding.io.init := ...
padding.io.cmd <> 
padding.io.rsp <>
Clone this wiki locally