Skip to main content

SageMath Library for Cryptographic Functions

A SageMath library for cryptographic functions, focusing on quadratic APN (Almost Perfect Nonlinear) functions.

The library provides tools for:

  • converting between different representations of a function
  • generating known infinite families of quadratic APN polynomials in univariate form
  • deciding whether a function belongs to these families

Features

  • Conversion routines between univariate polynomial representation and other common representations of vectorial Boolean functions:
    • truth tables
    • quadratic matrices
    • sequences
    • bivariate forms
    • trivariate forms
  • Implementations of known infinite families of quadratic APN functions in univariate form
  • Membership testing for identifying whether a function belongs to a known family

Requirements

  • SageMath 10.8 +
  • Python 3.9 +

Installation

In a Sage terminal write

pip install sagemath-cryptographic-functions-library

Or from a regular terminal write

sage --pip install sagemath-cryptographic-functions-library

From GitHub

In a Sage terminal write

pip install git+https://github.com/hoeeg/SageMath_library_for_cryptographic_functions.git

Or in regular terminal write

sage --pip install git+https://github.com/hoeeg/SageMath_library_for_cryptographic_functions.git

Usage

The package can either be imported by module

from sagemath_cryptographic_functions_library import conversions, families, membership
families.family_4(3)
...

or by importing functions directly

from sagemath_cryptographic_functions_library import family_4
family_4(3)
...

Using Sage Online

You can try Sage online without installing anything locally from any of

Binder   Gitpod Ready-to-Code

For a local install, the Sage Installation Guide walks through the available options.

More about Sage or how to download it, can be found in its Documentation.

Layout

├── sagemath_cryptographic_functions_library/
│   ├── __init__.py
│   ├── conversions.py    Conversions between representations
│   ├── families.py       Known APN family constructions
│   ├── helpers.py        Finite field utility functions
│   └── membership.py     Membership testing algorithms
├── README.md             This file
├── pyproject.toml        Build configuration
└── LICENCE               Copyright information

Metadata

Release files for sagemath-cryptographic-functions-library 0.2.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 sagemath-cryptographic-functions-library 0.2.0
File Size Uploaded Provenance Actions
sagemath_cryptographic_functions_library-0.2.0.tar.gz 24.9 kB With provenance Details for sagemath_cryptographic_functions_library-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sagemath-cryptographic-functions-library 0.2.0
File Interpreter ABI Platform Actions
sagemath_cryptographic_functions_library-0.2.0-py3-none-any.whl Python 3 none any Details for sagemath_cryptographic_functions_library-0.2.0-py3-none-any.whl

Total release size: 50.9 kB

Release files / sagemath_cryptographic_functions_library-0.2.0.tar.gz

Download URL sagemath_cryptographic_functions_library-0.2.0.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f74e43f89e354255f860fdf22ecbc48b117225d3678cbbfa2b6a6700b79277aa
BLAKE2b-256 checksum
How to use checksums
ca9a857c5391042f1c41bdc7fe09ef659f089e384c7c36903ca4aad64f2cbd25
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 May 31, 2026.

Transparency log

Release files / sagemath_cryptographic_functions_library-0.2.0-py3-none-any.whl

Download URL sagemath_cryptographic_functions_library-0.2.0-py3-none-any.whl
Size 26.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c4260569bc4ea98f2a964fd8ed19e7a7f55c806a538f30a5009431d0f279c57
BLAKE2b-256 checksum
How to use checksums
b8a60c370b884c63f69ea1d8e063ceec43ee5adfbcd4102a29679dc6bed178bb
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 May 31, 2026.

Transparency log

Security for sagemath-cryptographic-functions-library 0.2.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sagemath_cryptographic_functions_library-0.2.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 May 31, 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.

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