Skip to main content

GGH-crypto

GGH-crypto is a Python package implementing the Goldreich-Goldwasser-Halevi (GGH) public key cryptosystem and its optimization, GGH-HNF by Micciancio. This package is designed for educational and research purposes, offering insights into lattice-based cryptography. This project was developed as part of a 3-year degree program at the Università degli Studi di Milano (University of Milan). It explores the resilience of lattice-based cryptography against quantum threats and introduces an hybrid variant.

Features

  • Implementation of the original GGH cryptosystem (1997)
  • Implementation of the GGH-HNF optimization (2002)
  • Utility functions for lattice-based cryptography
  • Algorithms for solving the Closest Vector Problem (CVP)
  • Lattice reduction algorithms

Usage and details

For detailed installation, usage, examples and documentation, please visit the GitHub repository.

Note

Both the original GGH cryptosystem and its GGH-HNF optimization have known security vulnerabilities. This implementation is not intended for production use.

Changelog

1.0.5

  • Added nguyen_fix parameter to GGHCryptosystem (default False). When enabled, implements the Mandangan et al. (2020) countermeasure against Nguyen's attack: error entries are drawn from {σ-2, σ-1, σ, σ+1} instead of {-σ, +σ}, preserving ||e|| = σ√n while breaking the elimination stage of the attack.
  • Key generation with nguyen_fix=True automatically retries until a basis yielding σ > 2 is found (required by the countermeasure). Raises ValueError after 100 failed attempts with a suggestion to increase the dimension.

1.0.4

  • Initial stable release.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ggh_crypto-1.0.5.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ggh_crypto-1.0.5-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file ggh_crypto-1.0.5.tar.gz.

File metadata

  • Download URL: ggh_crypto-1.0.5.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for ggh_crypto-1.0.5.tar.gz
Algorithm Hash digest
SHA256 afa970c0bf6452471f7071c76477a22c90ab8f6ef9adc8aca602de8b878a8aaa
MD5 a5148853555306db2b4fe295c4ddb2d4
BLAKE2b-256 a0308e314c86acf65509e5830b301e4f32543148a3e1e7a1a792638732aefb34

See more details on using hashes here.

File details

Details for the file ggh_crypto-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: ggh_crypto-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for ggh_crypto-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b80f3bdd1c263b73e7cfce8276c58bea673dc80bcbeeaaf42644bb5b693f6e61
MD5 b4c1908f84fdad063e342083a63ec668
BLAKE2b-256 437c81e896ac479987dc2e603f6eecf79bbe8d0fdc4c3c9ededc68ac28a5978e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page