SPSDK IPED - PRINCE Cipher Backend
High-performance C++ PRINCE cipher backend for SPSDK's IPED (Inline PRINCE Encryption/Decryption) module.
Installation
Prerequisites
A C++ compiler is required to build the native PRINCE cipher library:
- Linux/macOS: GCC or Clang (install via your package manager)
- Windows: MS Build Tools (instructions)
Install from source
pip install -e path/to/spsdk_plugins/iped
Install from Bitbucket
pip install git+ssh://git@bitbucket.sw.nxp.com/spsdk/spsdk_plugins.git#subdirectory=iped
Usage with SPSDK
When this package is installed, SPSDK's IPED module automatically detects the C++ backend and uses it for ~100-150x faster PRINCE cipher operations compared to the built-in pure-Python fallback.
No additional configuration is needed — just install the package alongside SPSDK.
Standalone usage
from spsdk_iped import IPED
# CTR mode encryption
cipher = IPED(key=0x01, address=0x80003000, iv=0x79EAFAB3A72412A1)
encrypted = cipher.encrypt(plaintext_bytes)
# Decryption
cipher2 = IPED(key=0x01, address=0x80003000, iv=0x79EAFAB3A72412A1)
decrypted = cipher2.decrypt(encrypted)
Performance
The C++ backend provides approximately 100-150x speedup over the pure-Python implementation:
| Backend | Throughput |
|---|---|
| Python (built-in) | ~0.03 MB/s |
| C++ (this package) | ~5 MB/s |
License
BSD-3-Clause
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file spsdk_iped-0.1.1.tar.gz.
File metadata
- Download URL: spsdk_iped-0.1.1.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
245829951d5f31ae7a105a944f2c9fc4d02eaed442d5e191b1efdbbf1e34afcc
|
|
| MD5 |
d8daa70b2eca6fa5f43c0da55a55abd3
|
|
| BLAKE2b-256 |
5ccdf8d64844a8c25fe9d25a5f220633c2969f39ccea889d67eea9d9a5d1d0d3
|
Provenance
The following attestation bundles were made for spsdk_iped-0.1.1.tar.gz:
Publisher:
deploy.yml on nxp-mcuxpresso/spsdk_plugins
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spsdk_iped-0.1.1.tar.gz -
Subject digest:
245829951d5f31ae7a105a944f2c9fc4d02eaed442d5e191b1efdbbf1e34afcc - Sigstore transparency entry: 2580436236
- Sigstore integration time:
-
Permalink:
nxp-mcuxpresso/spsdk_plugins@2b394f5c09f991e30d44a57bd12129877aa2556b -
Branch / Tag:
refs/tags/v3.11.0 - Owner: https://github.com/nxp-mcuxpresso
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@2b394f5c09f991e30d44a57bd12129877aa2556b -
Trigger Event:
push
-
Statement type: