Package: crypto_dpi_present_pkg

Description

Copyright lowRISC contributors.
Licensed under the Apache License, Version 2.0, see LICENSE for details.
SPDX-License-Identifier: Apache-2.0

Signals

Name Type Description
key_high longint unsigned
input longint unsigned
key_low longint unsigned
input longint unsigned
num_rounds int unsigned
input int unsigned
key_size_80 int unsigned
output int unsigned
key_schedule bit [NumRounds:0][63:0]
plaintext longint unsigned
input longint unsigned
key_high longint unsigned
input longint unsigned
key_low longint unsigned
input longint unsigned
num_rounds int unsigned
input int unsigned
key_size_80 int unsigned
ciphertext longint unsigned
input longint unsigned
key_high longint unsigned
input longint unsigned
key_low longint unsigned
input longint unsigned
num_rounds int unsigned
input int unsigned
key_size_80 int unsigned

Constants

Name Type Value Description
NumRounds int unsigned 31 parameters This is defined here so we can size all arrays properly.

Functions

Description
Helper Functions

Description
////////////////////////////////////////////////////
SV wrapper functions to be used by the testbench //
////////////////////////////////////////////////////
This function takes in a 128 bit key by default, it determines how to
split this key for the DPI calls based on the value of key_size_80.

This returns the list of round keys used during the course of the algorithm.

Description
This function encrypts the input plaintext with the PRESENT encryption
algorithm using the specified number of rounds.

This produces a list of all intermediate values produced after each round
of the algorithm, including the final encrypted ciphertext value.

Description
This function decrypts the input ciphertext with the PRESENT decryption
algorithm using the specified number of rounds.

This produces a list of all intermediate values produced after each round
of the algorithm, including the final decrypted plaintext value.