lowRISC / lowRISC/opentitan

[keymgr/kmac] how kmac should send `kmac_data_i.error`

Open
#16,792 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Earlgrey-PROD Candidate IP:keymgr IP:kmac SW:cryptolib
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

As brought up in this comment, we may want to find a better way to send the error when KMAC detects a fault during an operation requested by keymgr. We haven't had a conclusion in that discussion, so file this issue to continue on it.

Here are some approaches we brought up.

  1. current implementation (no design change needed): kmac sends error without done, and keymgr gets stuck at the operation. Eventually, the chip will be reset as kmac sends a fatal alert.
  2. make the operation complete normally: change Kmac also send done along with error. Also need to set ready high to accept the remaining data from keymgr.
  3. treat the error as an interrupt to keymgr: keymgr finishes the operation once it sees the error is set. This changes the handshaking protocol, which impacts the current DV. My assumption was that error only asserts when done is set. We need to update the block-level TB if we choose this.

As a DV person, slightly prefer to 1) or 2) as they have less DV impact. I'm open to 3) as well, if it makes more sense to the design.

cc: @ballifatih @tjaychen @eunchan @cindychip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked discussion in pull request 16661 and inspect the current KMAC/keymgr handshake around kmac_data_i.error, done, and ready. Compare the three proposed behaviors and check the block-level DV impact; the work is done only after the protocol choice is agreed and the affected DV coverage is updated.

Written by the indexing model from the issue text.

Assessment

Domain
cryptography, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.