Commit graph

6 commits

Author SHA1 Message Date
Greg Chadwick
3e4669f086 [rtl] Add SEC_CM markers for security features
These are used by the OpenTitan project to track the implementation of
security countermeasures
2022-03-09 08:57:24 +00:00
Philipp Wagner
a25790abf9 [style] Indent module header with two spaces
Both the parameter and the port list in a module header should be
indented with two spaces, according to our style guide.
2021-08-31 15:30:28 +02:00
Philipp Wagner
be27bc8bcf [style] Fix whitespace issues around operators
Our style guide typically require a single whitespace around operators.
2021-08-31 15:30:28 +02:00
Tom Roberts
65bf9c94f9 [rtl] Add LFSR permutation option
Random constants are sent through the hierarchy as parameters in-line
with other OpenTitan modules.

Further detail on this mechanism can be found in lowrisc/opentitan#2229

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-08-10 16:13:02 +01:00
Xiang Wang
684d4205bf Prevent writing CSR_SECURESEED to get the seed of dummy instruction
Although CSR_SECURESEED is unreadable, an attacker can write a new seed,
which brings convenience to the attack. This patch is used to XOR the
historical seed, so that even if the attacker writes a new value to
CSR_SECURESEED , he cannot know the value of the seed.

Signed-off-by: Xiang Wang <merle@hardenedlinux.org>
2020-06-23 11:48:33 +01:00
Tom Roberts
d5ee96fff6 [rtl] Add dummy instruction insertion
- Adds a new module in the IF stage to inject dummy instructions into
  the pipeline
- Control / frequency of insertion is governed by configuration CSRs
- Extra CSR added to allow reseed of the internal LFSR useed for
  randomizing insertion
- Extra logic added to the register file to make dummy instruction
  writebacks look like real intructions (via the zero register)

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2020-05-21 13:58:01 +01:00