A seed plate scanner and parser tool
Project description
SLIP-P - Shamir DEK Plates
SLIP-P is a small Python demo that shows how to split DEKs (128/192/256-bit) with Shamir secret sharing and render OneKey-style plates with a small checksum.
This repository was refactored into modular components (CLI, checksum, plate renderer, Shamir wrappers, and crypto helpers) and includes unit tests.
Installation
Quick (no editable install):
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt pytest
PYTHONPATH=. pytest -q
Recommended (editable install so package imports work automatically):
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt pytest
# then (optional) install editable if you added pyproject/setup.cfg
pip install -e .
pytest -q
If you don't want to install, setting PYTHONPATH=. before pytest or running
the CLI via python -m slip_plate.cli will work.
Usage
This will generate a 256-bit DEK, split it into Shamir shares, print the plates and then recover the DEK to decrypt the message.
Run the CLI/demo:
python -m slip_plate.cli --dek-size 256 --parts 3 --threshold 2
Run the example runner:
python -m examples.example_run --dek-size 256 --parts 3 --threshold 2
Example OneKey-style Plate
Below is a randomized example output for a KEK share plate (128-bit DEK, 2-of-3 Shamir):
=== Shares OneKey-style ===
=== KEK Share 1 ===
2 1 │ │
0 0 5 2 │ 1 │
4 2 1 5 │ 2 6 3 1 │
8 4 2 6 │ 8 4 2 6 │ 8 4 2 1
─────────────────────────────
1 | ○ ● ● ● │ ● ○ ○ ● │ ● ● ○ ○ │
2 | ○ ○ ● ○ │ ○ ○ ○ ○ │ ○ ○ ● ○ │
. | . . . . | . . . . | . . . . |
. | . . . . | . . . . | . . . . |
. | . . . . | . . . . | . . . . |
11 | ○ ○ ○ ● │ ● ● ● ○ │ ○ ○ ● ○ │
12 | ● ● ○ ○ │ ● ● ○ ● │ ● ○ ○ ○ │
─────────────────────────────
Dots (…) represent truncated rows for brevity.
Security Model
- Plates are generated once and stored offline
- DEKs are reconstructed from a quorum of shares during encryption or decryption
- Nonces are unique per encryption and embedded in the ciphertext
- No DEK is stored digitally outside memory during use
Tests
Run all tests:
pytest -q
Run a single test file:
pytest tests/test_shamir.py -q
Notes and caveats
- Tests include a basic end-to-end flow that encrypts data, splits the DEK, recovers it and decrypts to verify correctness.
- The plate renderer uses ANSI symbols/colors for terminal output.
- This is a demo / research tool - treat outputs as examples and review the code and cryptographic choices before using in production.
- Keep printed plates physically secure; the checksum helps detect transcription errors but is not a replacement for proper key management.
Contributions welcome - open a PR or an issue on the repo if you have improvements or questions.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slip_plate-0.1.0.tar.gz.
File metadata
- Download URL: slip_plate-0.1.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b45a1b0fa3d0e0bfefcb720be7deef4bea9ea3c5b00c3e1d76bfee4186180a5c
|
|
| MD5 |
7112f80274100589746b3d3567eaf430
|
|
| BLAKE2b-256 |
b9f78edfe24943590b04cc17443d91f3359945253a4db2e39008993ec6c0ec80
|
File details
Details for the file slip_plate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: slip_plate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dc7e44f6c0952ceb7ee81348707678a9f0dc2ad84000175ae324fc08c2b9988
|
|
| MD5 |
27b009b179c69633e7d988e6179a0b75
|
|
| BLAKE2b-256 |
bf83e98586dc93b8086bb802972e7fdfda928175396b1e030ee2b12edbbe503b
|