Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .delivery/d1.tgz
Binary file not shown.
Binary file removed .delivery/d2.tgz
Binary file not shown.
Binary file removed .delivery/d3.tgz
Binary file not shown.
Binary file removed .delivery/d4.tgz
Binary file not shown.
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.py]
indent_size = 4

[*.{v,sv}]
indent_size = 4

[*.{html,css}]
indent_size = 2

[*.{yml,yaml,json}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[{Makefile,*.mk}]
indent_style = tab
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Bug report
description: Report something that is not working
labels:
- bug
body:
- type: textarea
id: what
attributes:
label: What happened?
description: Describe the bug and what you expected instead.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Numbered steps, as exact as possible.
validations:
required: true
- type: dropdown
id: lab
attributes:
label: Lab
options:
- 1 LFSR hop generator
- 2 PRNG graveyard
- 3 CPA of SipHash
- 4 Masking
- 5 Fault injection / TMR
- 6 Trojan / PUF
- Trace explorer (HTML)
- Grader / tooling
validations:
required: true
- type: input
id: env
attributes:
label: Operating system and Python version
description: e.g. Ubuntu 24.04, Python 3.12.3 (`python3 --version`).
validations:
required: true
- type: input
id: tools
attributes:
label: Other tool versions
description: Browser + Playwright version for the explorer, or RTL simulator versions if relevant.
validations:
required: false
- type: input
id: commit
attributes:
label: Commit
description: Output of `git rev-parse --short HEAD`.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Logs or output
description: Paste relevant output. It will be formatted as code. Remove personal data first.
render: shell
validations:
required: false
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Feature request
description: Suggest an improvement
labels:
- enhancement
body:
- type: textarea
id: problem
attributes:
label: Problem or motivation
description: What are you trying to do that is hard today?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed solution
description: Describe what you would like to see.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Other approaches you thought about.
validations:
required: false
- type: textarea
id: lab
attributes:
label: Lab or exercise
description: Which lab it extends, learning objective and expected duration.
validations:
required: false
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Summary

What does this change and why?

## Checklist

- [ ] `python -m rtlseclab.check` passes (all solutions pass their graders)
- [ ] `python -m rtlseclab.check --starters` still shows every starter failing cleanly
- [ ] `python -m unittest tests.test_graders` passes
- [ ] Copied code carries an ORIGIN header
- [ ] Documentation updated where behaviour changed
- [ ] No secrets, keys or personal data committed

## Test notes

How was this verified? Paste commands and results, or write "not run".
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
kit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: python -m pip install -r requirements.txt
- name: Every solution passes its grader; every starter fails cleanly
run: python -m rtlseclab.check --starters
- name: Grader tests (starters in sync, mutants caught, standalone, ORIGIN headers)
run: python -m unittest -v tests.test_graders
- name: Student export contains no solutions
run: |
python -m rtlseclab.tools.make_student_kit "$RUNNER_TEMP/student"
! find "$RUNNER_TEMP/student" -name 'solution.py' -o -name 'answer_key.md' | grep .
cd "$RUNNER_TEMP/student" && ! python labs/lab1_lfsr_break/grader.py labs/lab1_lfsr_break/starter.py

seed-robustness:
# Tolerance bands must hold for seed streams other than the default one. Slow, so not on every push.
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: python -m pip install -r requirements.txt
- run: python tests/test_robustness.py 20 4
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,12 @@ dist/
*.wlf
*.fsdb
*.vpd

# --- RTL-Sec-Lab ---
# student hand-out export (python -m rtlseclab.tools.make_student_kit)
dist/
# delivery bundles duplicate tracked files
.delivery/
*.tgz
.ruff_cache/
.mypy_cache/
9 changes: 9 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cff-version: 1.2.0
message: If you use this software, please cite it as below.
title: RTL-Sec-Lab
type: software
authors:
- given-names: Kavin
family-names: K K
alias: Kavin-Re
repository-code: https://github.com/Kavin-Re/RTL-Sec-Lab
32 changes: 32 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Code of Conduct

This project follows the [Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). The full text at that link applies; this is a summary.

## Our pledge

We pledge to make participation in RTL-Sec-Lab a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Expected behaviour

- Be respectful, welcoming and constructive.
- Accept feedback gracefully and give it kindly.
- Focus on what is best for the project and community.

## Unacceptable behaviour

- Harassment, insults, trolling, or personal or political attacks.
- Sexualized language or imagery, and unwelcome attention.
- Publishing others' private information without permission.
- Other conduct that would reasonably be considered inappropriate in a professional setting.

## Enforcement

Maintainers may remove, edit or reject comments, commits, issues and other contributions that violate this code, and may ban contributors for behaviour they deem harmful.

## Reporting

To report a problem, open an issue at https://github.com/Kavin-Re/RTL-Sec-Lab/issues without including sensitive details, and ask for private follow-up. Maintainers will respond and handle reports with discretion.

## Attribution

Adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
33 changes: 33 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Contributing to RTL-Sec-Lab

Thanks for your interest. RTL-Sec-Lab is a simulation-only workshop kit on the hardware security of a small keyed hop/PRF engine. Read `docs/facilitator_guide.md` first.

## Getting started

Python 3 and numpy; no network access is needed.

```
python -m rtlseclab.check # all solutions through all graders
python -m rtlseclab.check --starters # every starter must FAIL cleanly
python labs/lab3_power_cpa/grader.py labs/lab3_power_cpa/starter.py
```

## Testing

```
python -m unittest tests.test_graders
python tests/test_explorer.py # needs Playwright; skipped otherwise
```

Starters are generated from solutions (see the README); edit the solution, then regenerate. Copied code must carry an ORIGIN header.

## Pull requests

- Open an issue first for larger changes.
- Keep PRs focused and fill in the pull request template.
- Follow `.editorconfig` and match the style of surrounding code.
- Say which simulator and tool versions you used for RTL changes.

## Conduct

Participation is governed by the [Code of Conduct](CODE_OF_CONDUCT.md).
Loading
Loading