https://github.com/grondilu/finite-fields-raku
Finite Fields in raku
https://github.com/grondilu/finite-fields-raku
finite-field-arithmetics finite-fields galois-field
Last synced: 3 months ago
JSON representation
Finite Fields in raku
- Host: GitHub
- URL: https://github.com/grondilu/finite-fields-raku
- Owner: grondilu
- License: artistic-2.0
- Created: 2012-12-04T08:52:30.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2025-02-28T11:05:47.000Z (4 months ago)
- Last Synced: 2025-04-12T02:26:07.388Z (3 months ago)
- Topics: finite-field-arithmetics, finite-fields, galois-field
- Language: Raku
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Finite Fields Aritmetics in raku
```raku
use FiniteField;
my $*modulus = 13;say 10 + 5; # 2
say 10 / 3; # 12 (3*12 = 36 = 13*2 + 10)
```## Notes
* The dynamic variable `$*modulus` must be defined before calling any overloaded operator,
otherwise the program will crash (no exception is handled so far).
* Modular division will not check for primality of modulus or any other requirements.
* Define a modulus for each lexical scopes you import the module in.
* Althouh the name of this repo is using a plural, the name of the module
itself is singular, because you only use one finite field at a time.
* The main purpose of this module is to make writing cryptographic code easier.