lowRISC / lowRISC/opentitan

[ascon] Tracking Ascon TODOS

Open
#22,452 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

### Description

This issue is to track major TODOs for Ascon.

From #22218:
> Normally, we also require to specify an issue number with the TODO, e.g. TODO(#12341231241511151). Since ASCON is a totally new block and there are many such TODOs in the beginning, I don't think we need to create many specific issues and link them. But we should have one generic issue where all this is noted (it doesn't need to be linked in the RTL). We did that for AES and flash_ctrl and I think that worked very well.

### List of TODOs
- [ ] add hardening
- [ ] add Ascon XOF https://github.com/lowRISC/opentitan/issues/22478
- [ ] add key sideloading
#### General TODOS
- [x] link and build documentation https://github.com/lowRISC/opentitan/pull/22218#discussion_r1553624931_
- [ ] add links to the documentation at multiple places https://github.com/lowRISC/opentitan/issues/22178
- [x] Add DV link to ascon. hjson https://github.com/lowRISC/opentitan/pull/22218#discussion_r1539457277_ part of https://github.com/lowRISC/opentitan/pull/24681
#### prim_ascon_duplex TODOs
- [ ] Increase the TB and the vendor code to support Ascon128a and Ascon128 at the same time in the TB of https://github.com/lowRISC/opentitan/pull/22981 https://github.com/lowRISC/opentitan/issues/22478
- [ ] add hardening
- [ ] add blinding for `tag_out_o`, `data_out_o`, and round input
- [ ] add check what to do if `data_in_valid_bytes_i` is greater than blocksize
- [ ] add backpressure check, if `data_out_ready_i` is false. Currently this is captured on systemlevel in the ascon_core. For AD this not a problem. For MSG (except of the the first word) data_in is only written after data_out has been read. See also https://github.com/lowRISC/opentitan/pull/22981#discussion_r1727027981
- [ ] double check mubi for control signals and remove TODO
#### ascon_core TODOS
- [ ] add hardening
- [ ] connect entropy source
- [ ] connect stall register
- [ ] add logic to track only one share, if input is provided unmasked
- [x] add mubi signals
- [x] connect `idle_o`
- [x] hook up alerts to alert handler
- [x] https://github.com/lowRISC/opentitan/issues/24451
- [ ] add escalation management
- [ ] change logic to sanitize mubi values *before* they are written to the register. Thus, software does not cause a fatal alert, when writing wrong mubi encodings. This is best factored out to the reggen-tool and implemented in the register_top
- [ ] add feedback path to the trigger (start/wipe) register
- [ ] add wipe/reset logic to manual cancel/clear an Ascon operation
- [ ] add manual mode for SCA
- [ ] add output override (manual/automatic mode)
- [ ] discuss if a new key must provided for each new encryption (like it is enforced for the nonce), or if a key can be reused (currently this results in an error)
- [ ] have a second look at the "clear/read/invalid" logic of input/output registers
- [ ] have a second look hw2reg.output_valid.msg_valid and hw2reg.output_valid.tag_valid.d Currently this value is first written to a internal register and then copied to the output register. Either use hwext on this, or directly assign the values
- [ ] add control FSM to check the correct usage of the duplex core
- [x] create error codes and hook up error registers
- [x] hook up duplex FSM state register to debug register
- [ ] double check that `_REGEN` for duplex FSM state debug register is working, and document this in the regtool. If working, add documentation in https://github.com/lowRISC/opentitan/issues/6
- [x] add tag comparison

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

This is a broad tracker covering unchecked work in prim_ascon_duplex and ascon_core, including hardening, key sideloading, control logic, and register behavior. Start by selecting one unchecked TODO and reviewing the referenced issue or pull request; done means that specific item is implemented and its associated validation or documentation is complete.

Written by the indexing model from the issue text.

Assessment

Domain
cryptography, embedded-iot, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.