IEEE 1735 HDL Encryptor
A Python tool to encrypt HDL (Verilog/VHDL) files following the IEEE 1735 standard.
Features
- Supports Verilog and VHDL.
- Detects code blocks marked with protection pragmas.
- RSA key-based session key wrapping.
- AES-256-CBC data encryption.
- IEEE 1735 compliant formatting.
Installation
This project uses uv for dependency management.
From Source
-
Clone the repository:
git clone https://github.com/RasmusGOlsen/encrypt.git cd encrypt
-
Install dependencies:
uv sync
Usage
You can run the encryptor using uv run encrypt:
uv run encrypt <input_file> -k <public_key_pem> [options]
Arguments
input: The source HDL file (Verilog or VHDL).-k, --key: Path to the recipient's RSA public key (PEM format).-o, --output: (Optional) Path to the output file. Defaults to<input>.protected.--owner: (Optional) Key owner name (default: "Unknown").--keyname: (Optional) Key name (default: "default_key").--full-file: (Optional) Encrypt the entire file content, ignoring any pragmas.
Example
uv run encrypt my_design.v -k company_pub_key.pem -o my_design_protected.v
How it Works
Protection Pragmas
The tool searches for specific pragmas in your source code to identify which blocks should be encrypted.
Verilog:
`pragma protect begin
// Your sensitive code here
`pragma protect end
VHDL:
`protect begin
-- Your sensitive code here
`protect end
Note: VHDL also supports -- pragma protect begin style pragmas.
Full File Encryption
If no pragmas are found, or if the --full-file flag is used, the entire content of the file will be encrypted and wrapped in IEEE 1735 headers.
Development
Running Tests
uv run pytest
Linting and Formatting
uv run ruff check .
uv run ruff format .
Metadata
Release files for hdl-encrypt 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hdl_encrypt-0.1.0.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hdl_encrypt-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / hdl_encrypt-0.1.0.tar.gz
| Download URL | hdl_encrypt-0.1.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc5828d40bcbc2858119874ec51c080b27a4733d35b1826f584849d9ccd352b2
|
|
BLAKE2b-256 checksum How to use checksums |
f65818c367249d9b0cf49c7c678e04b05d7218f34e3db394b73800aeb9895150
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.
Transparency logRelease files / hdl_encrypt-0.1.0-py3-none-any.whl
| Download URL | hdl_encrypt-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64f6d68091ab2b23956f4d05c8e3e448c1860b8752408c951587391695111f04
|
|
BLAKE2b-256 checksum How to use checksums |
fb8e3afa857caad6f3a69ac330afb9a92491cc5137cf6cc192c4461550b9c277
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.
Transparency log