-
Notifications
You must be signed in to change notification settings - Fork 19
Pad_xB_1
Snoopy87 edited this page Aug 16, 2018
·
2 revisions
This padding algorithm works in byte and it is used by SHA3 and works as follow :
- Add a the specific byte at the end of the message
- Add as sequence of 0 until the end of the block
- Add 0x80 at the end of the block
- HashPadding_Std uses the PaddingIO interface.
Core | Target | Performance | Aera | RAM |
---|---|---|---|---|
*_Std | Altera Cyclone V (C6) | - | - | - |
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 <>