ruffini
Library for computations over abstract algebraic structures such as finite fields and polynomial rings.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.1%) to scientific vocabulary
Keywords
Repository
Library for computations over abstract algebraic structures such as finite fields and polynomial rings.
Basic Info
Statistics
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
Ruffini
Computations over algebraic structures in Java made easy.
Table of Contents
About The Project
The Ruffini library is developed to make it easy to write algorithms in Java involving algebraic structures such as finite fields, polynomial rings, field extensions etc. The library includes an extensive library of already implemented algorithms such as the Euclidean algorithm, polynomial division etc. to make implementation even easier.
The project is named after the italian mathematician Paolo Ruffini (1765-1822) who, among other things, contributed to group theory and was the first to give a proof (although incomplete) that there is no general formula to solve quintic (and higher order) equations.
Submodules
The library contains multiple submodules:
- Common: Definition of most commonly used abstract structures (groups, rings, fields, etc) and generic algorithms used throughout the library.
- Demos: Example usages of the library. See also the Demos section.
- Elliptic: Elliptic curves over generic fields and a few concrete constructions (Curve25519 and BLS12-381).
- Finite-fields: Constructions of finite fields and algebraic field extensions.
- Integers: Concrete constructions of integers and rational numbers.
- Parser: Algorithms to parse algebraic expressions from strings and evaluate them.
- Permutations: Construction and algoritms for permutation groups.
- Polynomials: Single- and multivariate polynomials over arbitrary rings or fields. Includes common algorithms such as the computation of Lagrange interpolation and Gröbner bases.
- Reals: Arbitrary precision real numbers using a constructive representation.
Built With
The project may be build using maven,
mvn clean install
and the documentation with
mvn javadoc:aggregate
Usage
The Ruffini library is organized analogous of how abstract algebra is presented in mathematics. The base of the library
are a number of interfaces representing abstract algebraic structures. They are organized in an inheritance hierachy as
seen in figure below. Note that E is a generic class, representing the element of the given structure.
As in abstract algebra, an algorithm may be defined for an abstract structure and then be used with any concrete
structure satisfying the definition of the abstract structure. As an example, consider the implementation of the
Gram-Schmidt process definded over vectors of type V
and scalars of type S. Now, this code may be used with any
concrete implementations of a vector space over a field.
```java
public class GramSchmidt, List
private final VectorSpace<V, S, F> vectorSpace;
private final BiFunction<V, V, S> innerProduct;
public GramSchmidt(VectorSpace<V, S, F> V,
BiFunction<V, V, S> innerProduct) {
this.vectorSpace = V;
this.innerProduct = innerProduct;
}
@Override
public List<V> apply(List<V> vectors) {
List<V> U = new ArrayList<>();
Projection<V, S, F> proj = new Projection<>(vectorSpace, innerProduct);
for (V v : vectors) {
for (V u : U) {
V p = proj.apply(v, u);
v = vectorSpace.subtract(v, p);
}
U.add(v);
}
return U;
}
} ```
The library also contains some concrete instantiations of algebraic structures such as prime fields, finite fields, class groups and certain elliptic curve constructions (Curve25519 and BLS12-381).
Demos
There are a few demo applications showing some capabilities of the library in the demos module.
These include an implementation of the AKS primality testing algorithm, computing the optimal Ate pairing over the BLS12-381 elliptic construction, a demonstration of arbitrary precision arithmetic with real numbers inspired by the work of Hans-J Boehm and an implementation of the Poseidon hash function over BN254.
Contributing
We welcome any help from the community, both if you want to help out developing new features for Ruffini or fix a bug you've stumbled upon. Simply open a pull request with the suggested changes.
Referencing
If you are using the Ruffini library in a research project, please cite it as (setting the date field accordingly):
@software{Ruffini,
author = {{Jonas Lindstrøm}},
title = {{Ruffini} - Java library for computations over abstract algebraic structures},
note = {\url{https://github.com/jonas-lj/Ruffini}},
date = {},
}
Owner
- Name: Jonas Lindstrøm
- Login: jonas-lj
- Kind: user
- Location: Aarhus, Denmark
- Company: Mysten Labs
- Website: https://jonaslindstrom.dk
- Twitter: lindstrom_dk
- Repositories: 32
- Profile: https://github.com/jonas-lj
Sound // Crypto // Math
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Ruffini
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Jonas
family-names: Lindstrøm
email: mail@jonaslindstrom.dk
orcid: 'https://orcid.org/0000-0002-1989-3019'
repository-code: 'https://github.com/jonas-lj/Ruffini'
abstract: Computations over algebraic structures in Java made easy
keywords:
- Algebra
- Java
- Crypotography
license: MIT
GitHub Events
Total
- Watch event: 1
- Delete event: 3
- Push event: 2
Last Year
- Watch event: 1
- Delete event: 3
- Push event: 2
Dependencies
- com.google.guava:guava 30.0-jre
- junit:junit 4.13.1
- org.apache.commons:commons-math3 3.6.1
- dk.jonaslindstrom:elliptic 0.2 compile
- dk.jonaslindstrom:finite-fields 0.2 compile
- dk.jonaslindstrom:reals 0.2 compile
- dk.jonaslindstrom:common 0.2 compile
- dk.jonaslindstrom:finite-fields 0.2 compile
- dk.jonaslindstrom:common 0.2
- dk.jonaslindstrom:integers 0.2
- dk.jonaslindstrom:polynomials 0.2
- dk.jonaslindstrom:common 0.2
- dk.jonaslindstrom:common 0.2
- dk.jonaslindstrom:integers 0.2 compile
- dk.jonaslindstrom:common 0.2
- dk.jonaslindstrom:common 0.2
- MathieuSoysal/Javadoc-publisher.yml v2.3.0 composite
- JamesIves/github-pages-deploy-action v4 composite
- actions/checkout v3 composite
- actions/setup-java v3 composite
- advanced-security/maven-dependency-submission-action 571e99aab1055c2e71a1e2309b9691de18d6b7d6 composite
- dk.jonaslindstrom.ruffini:common 0.4-SNAPSHOT compile
- dk.jonaslindstrom.ruffini:finite-fields 0.4-SNAPSHOT test