-
Notifications
You must be signed in to change notification settings - Fork 19
Block Cipher Mode of Operation (BCMO)
Snoopy87 edited this page Jan 22, 2018
·
2 revisions
Block cipher mode of operation ca be used with any symmetric algorithms implemented with the SymmetricCryptoBlockIO interface.
Interface | Signal | Description | ||
---|---|---|---|---|
cmd | Stream | valid/ready | Bool | Stream handshake |
key | Bits | The key used for the encryption/decryption | ||
iv* | Bits | Initialization Vector | ||
block | Bits | The block message to encrypt/decrypt | ||
enc* | Bool | Mode encrypt (1) or decrypt (0) | ||
mode | BCMO_Std_CmdMode | INIT/UPDATE | ||
rsp | Flow | valid | Bool | Data valid |
*this signal is optional
import spinal.core._
import spinal.lib._
import spinal.crypto.symmetric.des.DESCore_Std
import spinal.crypto.symmetric._
val core = new DESCore_Std()
val chaining = ECB_Std(core.io.g, ENC_DEC)
chaining.io.core <> core.io
chaining.io.bcmo <> ...
import spinal.core._
import spinal.lib._
import spinal.crypto.symmetric.des.DESCore_Std
import spinal.crypto.symmetric._
val core = new DESCore_Std()
val chaining = CBC_Std(core.io.g, ENC_DEC)
chaining.io.core <> core.io
chaining.io.bcmo <> ...
import spinal.core._
import spinal.lib._
import spinal.crypto.symmetric.des.DESCore_Std
import spinal.crypto.symmetric._
val core = new DESCore_Std()
val chaining = OFB_Std(core.io.g, chainingMode = ENC_DEC, algoMode = ENCRYPT)
chaining.io.core <> core.io
chaining.io.bcmo <> ...
import spinal.core._
import spinal.lib._
import spinal.crypto.symmetric.des.DESCore_Std
import spinal.crypto.symmetric._
val core = new DESCore_Std()
val chaining = CFB_Std(core.io.g, chainingMode = ENC_DEC, algoMode = ENCRYPT)
chaining.io.core <> core.io
chaining.io.bcmo <> ...