Module prim_prince
Block Diagram of prim_prince
Name |
Default |
Description |
---|---|---|
DataWidth |
64 |
|
KeyWidth |
128 |
|
NumRoundsHalf |
5 |
The construction is reflective. Total number of rounds is 2*NumRoundsHalf + 2 |
UseOldKeySched |
1'b0 |
This primitive uses the new key schedule proposed in https://eprint.iacr.org/2014/656.pdf Setting this parameter to 1 falls back to the original key schedule. |
HalfwayDataReg |
1'b0 |
This instantiates a data register halfway in the primitive. |
HalfwayKeyReg |
1'b0 |
This instantiates a key register halfway in the primitive. |
Name |
Type |
Direction |
Description |
---|---|---|---|
clk_i |
wire logic |
input |
|
rst_ni |
wire logic |
input |
|
valid_i |
wire logic |
input |
|
data_i |
wire logic [DataWidth - 1 : 0] |
input |
|
key_i |
wire logic [KeyWidth - 1 : 0] |
input |
|
dec_i |
wire logic |
input |
set to 1 for decryption |
valid_o |
var logic |
output |
|
data_o |
var logic [DataWidth - 1 : 0] |
output |
Name |
Kind |
Description |
---|---|---|
prim_prince.SupportedWidths_A |
immediate assert |
(((DataWidth == 64) && (KeyWidth == 128)) || ((DataWidth == 32) && (KeyWidth == 64)))
|
prim_prince.SupportedNumRounds_A |
immediate assert |
((NumRoundsHalf > 0) && (NumRoundsHalf < 6))
|
Always Blocks
- always_comb @()
pre-round XOR
- always_comb @()
post-rounds
This module is an implementation of the 64bit PRINCE block cipher. It is a fully unrolled combinational implementation with configurable number of rounds. Optionally, registers for the data and key states can be enabled, if this is required. Due to the reflective construction of this cipher, the same circuit can be used for encryption and decryption, as described below. Further, the primitive supports a 32bit block cipher flavor which is not specified in the original paper. It should be noted, however, that the 32bit version is * not * secure and must not be used in a setting where cryptographic cipher strength is required. The 32bit variant is only intended to be used as a lightweight data scrambling device.
See also
prim_present, prim_cipher_pkg
References
https://en.wikipedia.org/wiki/PRESENT
https://en.wikipedia.org/wiki/Prince_(cipher)
http://www.lightweightcrypto.org/present/present_ches2007.pdf
https://csrc.nist.gov/csrc/media/events/lightweight-cryptography-workshop-2015/documents/papers/session7-maene-paper.pdf
https://eprint.iacr.org/2012/529.pdf
https://eprint.iacr.org/2015/372.pdf
https://eprint.iacr.org/2014/656.pdf