Skip to main content

Lightweight authenticated encryption and hashing

Project description

Python implementation of Ascon

This is a Python3 implementation of Ascon v1.2, an authenticated cipher and hash function.

https://github.com/meichlseder/pyascon

Ascon

Ascon is a family of authenticated encryption (AEAD) and hashing algorithms designed to be lightweight and easy to implement, even with added countermeasures against side-channel attacks. It was designed by a team of cryptographers from Graz University of Technology, Infineon Technologies, and Radboud University: Christoph Dobraunig, Maria Eichlseder, Florian Mendel, and Martin Schläffer.

Ascon has been selected as the standard for lightweight cryptography in the NIST Lightweight Cryptography competition (2019–2023) and as the primary choice for lightweight authenticated encryption in the final portfolio of the CAESAR competition (2014–2019).

Find more information, including the specification and more implementations here:

https://ascon.iaik.tugraz.at/

Algorithms

This is a simple reference implementation of Ascon v1.2 as submitted to the NIST LWC competition that includes

  • Authenticated encryption ascon.encrypt(key, nonce, associateddata, plaintext, variant="Ascon-128") (and similarly decrypt) with the following 3 family members:

    • Ascon-128
    • Ascon-128a
    • Ascon-80pq
  • Hashing algorithms ascon.hash(message, variant="Ascon-Hash", hashlength=32) including 4 hash function variants with fixed 256-bit (Hash) or variable (Xof) output lengths:

    • Ascon-Hash
    • Ascon-Hasha
    • Ascon-Xof
    • Ascon-Xofa
  • Message authentication codes ascon.mac(key, message, variant="Ascon-Mac", taglength=16) including 5 MAC variants (from https://eprint.iacr.org/2021/1574, not part of the LWC proposal) with fixed 128-bit (Mac) or variable (Prf) output lengths, including a variant for short messages of up to 128 bits (PrfShort).

    • Ascon-Mac
    • Ascon-Maca
    • Ascon-Prf
    • Ascon-Prfa
    • Ascon-PrfShort

Project details


Download files

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

Source Distribution

ascon-0.0.9.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

ascon-0.0.9-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file ascon-0.0.9.tar.gz.

File metadata

  • Download URL: ascon-0.0.9.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for ascon-0.0.9.tar.gz
Algorithm Hash digest
SHA256 1bab009d0790d68612a147695612b765089a1c420ee25096555794d39442816d
MD5 a61bec2f559ac1ce656dfd69bf432c2f
BLAKE2b-256 3bb5ed90e1a21837e6f6d97adf0067e01f18d0aca0d8c387e613c68384adf191

See more details on using hashes here.

File details

Details for the file ascon-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: ascon-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for ascon-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 fb23a19ce0203a9b1c046cfff6650c3319d975d64d47d5d8a250c89dfa4ad804
MD5 48444330bbba2677be313e96b4d4300c
BLAKE2b-256 7bdd76c5f899abbf96ce1dae29248bc39e8381f5a3b4e8b25058dd51fb936e4e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page