Encrypt Verilog and VHDL files using the IEEE 1735 standard
Project description
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 .
Project details
Release history Release notifications | RSS feed
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 hdl_encrypt-0.1.0.tar.gz.
File metadata
- Download URL: hdl_encrypt-0.1.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc5828d40bcbc2858119874ec51c080b27a4733d35b1826f584849d9ccd352b2
|
|
| MD5 |
83e5af4fca82ea5fdec04106e7005293
|
|
| BLAKE2b-256 |
f65818c367249d9b0cf49c7c678e04b05d7218f34e3db394b73800aeb9895150
|
Provenance
The following attestation bundles were made for hdl_encrypt-0.1.0.tar.gz:
Publisher:
publish.yml on RasmusGOlsen/hdl-encrypt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hdl_encrypt-0.1.0.tar.gz -
Subject digest:
cc5828d40bcbc2858119874ec51c080b27a4733d35b1826f584849d9ccd352b2 - Sigstore transparency entry: 1188788847
- Sigstore integration time:
-
Permalink:
RasmusGOlsen/hdl-encrypt@46197e4c925b594090698117513060813a6e289e -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/RasmusGOlsen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@46197e4c925b594090698117513060813a6e289e -
Trigger Event:
release
-
Statement type:
File details
Details for the file hdl_encrypt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hdl_encrypt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64f6d68091ab2b23956f4d05c8e3e448c1860b8752408c951587391695111f04
|
|
| MD5 |
6c53fc115ee6e4c2a7559f684fdbedf7
|
|
| BLAKE2b-256 |
fb8e3afa857caad6f3a69ac330afb9a92491cc5137cf6cc192c4461550b9c277
|
Provenance
The following attestation bundles were made for hdl_encrypt-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on RasmusGOlsen/hdl-encrypt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hdl_encrypt-0.1.0-py3-none-any.whl -
Subject digest:
64f6d68091ab2b23956f4d05c8e3e448c1860b8752408c951587391695111f04 - Sigstore transparency entry: 1188788851
- Sigstore integration time:
-
Permalink:
RasmusGOlsen/hdl-encrypt@46197e4c925b594090698117513060813a6e289e -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/RasmusGOlsen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@46197e4c925b594090698117513060813a6e289e -
Trigger Event:
release
-
Statement type: