Skip to main content

presidio-hardened-crypto-channel

Secure cryptographic channel demonstrating ECDH key exchange, AES-256-GCM authenticated encryption, and HMAC integrity. Used in Experiment 1 of PRES-EDU-SEC-101 — Computer Security.

Setup

git clone https://github.com/presidio-v/presidio-hardened-crypto-channel.git
cd presidio-hardened-crypto-channel
pip install -r requirements.txt

Experiments

Run 1 — ECDH Key Exchange

python main.py --demo keyexchange --parties Alice Bob

Both parties derive identical session keys without transmitting the secret.

Run 2 — AES-256-GCM Encryption

python main.py --demo symmetric --message "Hello from Alice" --key-size 256

Run 3 — Full Secure Channel

python main.py --demo channel --client Alice --server Bob --messages 10

Run 4 — Break It: Remove HMAC

python main.py --demo channel --no-hmac --tamper

Without authentication, a tampered message is detected by the GCM tag — demonstrating that AES-GCM provides both confidentiality and integrity.

Run 5 — Measure

python main.py --demo channel --messages 100 --duration 60
python report.py --experiment 1

What to Observe

  • --no-hmac --tamper: AES-GCM's auth tag catches the flip — InvalidTag raised
  • --tamper (HMAC on): HMAC check fires first, before decryption attempt
  • Key takeaway: encryption provides confidentiality; GCM tag / HMAC provides integrity

Package Structure

src/presidio_crypto_channel/
├── keyexchange.py   X25519 ECDH + HKDF
├── symmetric.py     AES-256-GCM
├── channel.py       Full channel with optional HMAC
└── security.py      Logging + pip-audit

License

MIT


SDLC

This repository is developed under the Presidio hardened-family SDLC: https://github.com/presidio-v/presidio-hardened-docs/blob/main/sdlc/sdlc-report.md.

Metadata

Release files for presidio-hardened-crypto-channel 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for presidio-hardened-crypto-channel 0.1.0
File Size Uploaded Provenance Actions
presidio_hardened_crypto_channel-0.1.0.tar.gz 13.2 kB With provenance Details for presidio_hardened_crypto_channel-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for presidio-hardened-crypto-channel 0.1.0
File Interpreter ABI Platform Actions
presidio_hardened_crypto_channel-0.1.0-py3-none-any.whl Python 3 none any Details for presidio_hardened_crypto_channel-0.1.0-py3-none-any.whl

Total release size: 21.6 kB

Release files / presidio_hardened_crypto_channel-0.1.0.tar.gz

Download URL presidio_hardened_crypto_channel-0.1.0.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f0a51e1d349a9c23ed35fad0a04bd4200bc14ad1639067dc73c506429ba065b7
BLAKE2b-256 checksum
How to use checksums
af78baa2ccac7ff1e8ae3f76ce1f1805165a295798ceababfbecb51803c5c5e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 11, 2026.

Transparency log

Release files / presidio_hardened_crypto_channel-0.1.0-py3-none-any.whl

Download URL presidio_hardened_crypto_channel-0.1.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a004d65ed4f43a3e6979762e7c059181f6c93de229aae71e30e4febfe795769
BLAKE2b-256 checksum
How to use checksums
2a3d1cb69e4ae1220063fca34e1f1aa36ca47332db46697a8ab557bc421e09ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 11, 2026.

Transparency log

Security for presidio-hardened-crypto-channel 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for presidio_hardened_crypto_channel-0.1.0.tar.gz

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 Jun 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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