Skip to main content

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

Metadata

Release files for ascon 0.0.9

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

Source distribution (sdist)

Source distribution for ascon 0.0.9
File Size Uploaded
ascon-0.0.9.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ascon 0.0.9
File Interpreter ABI Platform
ascon-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 20.0 kB

Release files / ascon-0.0.9.tar.gz

Download URL ascon-0.0.9.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1bab009d0790d68612a147695612b765089a1c420ee25096555794d39442816d
BLAKE2b-256 checksum
How to use checksums
3bb5ed90e1a21837e6f6d97adf0067e01f18d0aca0d8c387e613c68384adf191
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / ascon-0.0.9-py3-none-any.whl

Download URL ascon-0.0.9-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb23a19ce0203a9b1c046cfff6650c3319d975d64d47d5d8a250c89dfa4ad804
BLAKE2b-256 checksum
How to use checksums
7bdd76c5f899abbf96ce1dae29248bc39e8381f5a3b4e8b25058dd51fb936e4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

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