galois
A performant NumPy extension for Galois fields and their applications
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and uses a permissive MIT license. It fills a clear niche for finite-field arithmetic in Python with NumPy integration. The non-constant-time implementation is explicitly documented as unsuitable for production security but appropriate for research and education, so install only if that scope matches your use case.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with three runtime dependencies (numpy, numba, typing_extensions).
- Active maintenance with recent release (104 days ago) and 471 GitHub stars.
- Supports Python 3.7 through 3.14.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.
last release 2026-05-02 (104 days) · last repo commit 2026-07-15 · 471 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 269,763 downloads/mo, #8,250 on PyPI
Alternatives
Verify before relying
pip install galois
import galois
import numpy as np
GF = galois.GF(3**5)
x = GF([236, 87, 38, 112])
y = GF([109, 17, 108, 224])
z = x * y # multiplication in GF(3^5)- Performance comparison claims ('faster than native NumPy') lack quantitative benchmarks in the fact sheet.
- Whether lookup-table vs. explicit-calculation trade-off is configurable per operation or globally.
- Exact scope of supported polynomial operations beyond univariate polynomials mentioned.
- Whether the library's non-constant-time algorithms pose a practical risk for intended use cases (research, education, cryptanalysis).
What it is and what it does
Galois is a NumPy extension that lets you create arrays that perform all arithmetic in a finite field GF(p^m) instead of over real numbers. You define a field using galois.GF(p**m), which returns a FieldArray subclass that behaves like a NumPy array but enforces finite-field arithmetic on all operations. Internally, it replaces NumPy's universal functions with specialized versions compiled by Numba, configurable to use either lookup tables for speed or explicit calculation for memory efficiency.
The library targets research, cryptanalysis, education, and reverse engineering rather than production security (the algorithms are not constant-time and vulnerable to timing attacks). It includes support for linear algebra over finite fields, polynomial operations, forward error correction codes (BCH, Reed-Solomon), linear-feedback shift registers, and number-theoretic functions like factorization and primality testing.
Use it for
- Implement Reed-Solomon or BCH error correction codes for data transmission or storage systems.
- Perform polynomial arithmetic and factorization over finite fields for cryptanalysis or algorithm research.
- Conduct linear algebra computations (matrix operations, solving systems) constrained to a finite field.
- Prototype or analyze cryptographic algorithms that operate on Galois fields without writing low-level modular arithmetic.
- Generate or test irreducible, primitive, and Conway polynomials for finite field construction.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, installs with low friction, and uses a permissive MIT license. It fills a clear niche for finite-field arithmetic in Python with NumPy integration. The non-constant-time implementation is explicitly documented as unsuitable for production security but appropriate for research and education, so install only if that scope matches your use case.
Install
galois on PyPI
Before you install
Low friction: pure Python wheel with three runtime dependencies (numpy, numba, typing_extensions). Active maintenance with recent release (104 days ago) and 471 GitHub stars. Supports Python 3.7 through 3.14.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install galois
import galois
import numpy as np
GF = galois.GF(3**5)
x = GF([236, 87, 38, 112])
y = GF([109, 17, 108, 224])
z = x * y # multiplication in GF(3^5)
Verify before relying
- Performance comparison claims ('faster than native NumPy') lack quantitative benchmarks in the fact sheet.
- Whether lookup-table vs. explicit-calculation trade-off is configurable per operation or globally.
- Exact scope of supported polynomial operations beyond univariate polynomials mentioned.
- Whether the library's non-constant-time algorithms pose a practical risk for intended use cases (research, education, cryptanalysis).
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesnumpynumbatyping_extensions |
| Maintenance | Actively maintained 104 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 269,763 / month, #8,250 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchIntended Audience :: Telecommunications IndustryLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: MathematicsTopic :: Security :: CryptographyTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: galois-0.4.11-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “galois field arithmetic”
- galoisGalois extends NumPy arrays to perform arithmetic operations over…
- reedsoloEncodes and decodes data using Reed-Solomon error correction to…
- cypari2cypari2 provides a Python interface to PARI/GP, a number theory…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also lightecc · py-ecc · reedsolo · python-flint · numpy · cypari2 · pycryptodomex · primePy · ml-dtypes · numpy-quaternion