Skip to main content

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

spsdk_iped-0.1.1.tar.gz (21.3 kB view details)

Uploaded Source

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

Hashes for spsdk_iped-0.1.1.tar.gz
Algorithm Hash digest
SHA256 245829951d5f31ae7a105a944f2c9fc4d02eaed442d5e191b1efdbbf1e34afcc
MD5 d8daa70b2eca6fa5f43c0da55a55abd3
BLAKE2b-256 5ccdf8d64844a8c25fe9d25a5f220633c2969f39ccea889d67eea9d9a5d1d0d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for spsdk_iped-0.1.1.tar.gz:

Publisher: deploy.yml on nxp-mcuxpresso/spsdk_plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page