{"id":28807377,"url":"https://github.com/bkomuves/finite-fields","last_synced_at":"2026-05-15T13:36:20.286Z","repository":{"id":62435985,"uuid":"358413568","full_name":"bkomuves/finite-fields","owner":"bkomuves","description":"arithmetic in (small) finite fields","archived":false,"fork":false,"pushed_at":"2023-11-08T09:49:19.000Z","size":603,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-08T00:25:24.272Z","etag":null,"topics":["computer-algebra","finite-field-arithmetics","finite-fields","haskell"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bkomuves.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-15T22:54:53.000Z","updated_at":"2024-01-23T17:56:40.000Z","dependencies_parsed_at":"2022-11-01T21:32:58.738Z","dependency_job_id":null,"html_url":"https://github.com/bkomuves/finite-fields","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bkomuves/finite-fields","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkomuves%2Ffinite-fields","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkomuves%2Ffinite-fields/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkomuves%2Ffinite-fields/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkomuves%2Ffinite-fields/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bkomuves","download_url":"https://codeload.github.com/bkomuves/finite-fields/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkomuves%2Ffinite-fields/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33068792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-algebra","finite-field-arithmetics","finite-fields","haskell"],"created_at":"2025-06-18T11:40:48.624Z","updated_at":"2026-05-15T13:36:20.265Z","avatar_url":"https://github.com/bkomuves.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nFinite fields\n=============\n\nThis is a Haskell library implementing arithmetics in finite fields.\n\n\nStatus\n------\n\nSo far we have implemented:\n\n* generic prime fields - module `Math.FiniteField.PrimeField.Generic`\n* small prime fields, where small means `p \u003c 2^31` - module  `Math.FiniteField.PrimeField.Small`\n* small Galois fields, using a precomputed table of Conway polynomials - module `Math.FiniteField.GaloisField.Small`\n* small Galois fields, using tables of Zech's logarithm\n* C implementation of the Zech's logarithm stuff\n* subfields (only for the Zech representation)\n\nFurther plans\n--------------\n\n* generic field extensions\n* polynomials over finite fields\n* big finite fields relevant for cryptography\n* maybe even JIT compiling specific fields would make sense?\n* optional: elliptic curves over finite fields? (again we could have \"small\" curves \n  for algebraic geometry and \"very big\" curves for cryptography...)\n\n\nHow to use\n----------\n\nThe API is still in flux while I try to figure out the balance between ergonomy\nand type-safety.\n\nFor now, each field has a \"witness\" which has two purposes: 1) it's a proof that\nthe field actually exists (eg. `p` is a prime); and 2) carrying the necessary\ndata to for computations (eg. Conway polynomials). So there are two Haskell types\nfor each implementation: the witness represents the field itself, and the other \ntype represents the elements of the field.\n\nBoth the witness types and the field element types are parametrized by the field \nparameters (eg. `p` and `m` for a field of order `q = p^m`). You can \"create\" fields \nwrapped into existential types, and then you can do `case _ of` on that existential \ntype and do the calculations inside. Unfortunately this also means that the API is not \nreally `ghci`-friendly...\n\nThere is a common type class for all fields (defined in module `Math.FiniteField.Class`), \nso you can write polymorphic code and run it \"in\" any field implementation.\n\nThere are some example applications in the `examples` subdirectory.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkomuves%2Ffinite-fields","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbkomuves%2Ffinite-fields","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkomuves%2Ffinite-fields/lists"}