{"id":22301788,"url":"https://github.com/aldantanneo/bigints","last_synced_at":"2025-08-09T04:08:12.127Z","repository":{"id":265523328,"uuid":"893947981","full_name":"AldanTanneo/bigints","owner":"AldanTanneo","description":"WIP constant time bigint implementation in SPARK","archived":false,"fork":false,"pushed_at":"2025-01-30T13:18:26.000Z","size":178,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T23:46:33.830Z","etag":null,"topics":["ada","bigint","cryptography","formal-verification","spark"],"latest_commit_sha":null,"homepage":"","language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AldanTanneo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-25T13:42:02.000Z","updated_at":"2025-02-18T20:21:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"31a7be11-1e09-4533-b003-054122fa95a0","html_url":"https://github.com/AldanTanneo/bigints","commit_stats":null,"previous_names":["aldantanneo/bigints"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AldanTanneo%2Fbigints","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AldanTanneo%2Fbigints/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AldanTanneo%2Fbigints/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AldanTanneo%2Fbigints/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AldanTanneo","download_url":"https://codeload.github.com/AldanTanneo/bigints/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245563038,"owners_count":20635907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ada","bigint","cryptography","formal-verification","spark"],"created_at":"2024-12-03T18:31:02.946Z","updated_at":"2025-03-25T23:46:40.259Z","avatar_url":"https://github.com/AldanTanneo.png","language":"Ada","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests](https://github.com/AldanTanneo/bigints/actions/workflows/run_tests.yml/badge.svg)](https://github.com/AldanTanneo/bigints/actions/workflows/run_tests.yml)\n\n# SPARK Constant Time Big Integer library\n\nImplementation of a constant time big integer library, heavily inspired by [crypto-bigint](https://github.com/RustCrypto/crypto-bigint).\n\n## Usage\n\nThe implementations are generic over the size of the integer\n\n```ada\npackage U256 is new Bigints.Uint (256);\npackage U1024 is new Bigints.Uint (1024);\n```\n\nThere is also a generic package to deal with modular integers (ie, over a prime field)\n\n```ada\nP : U256 := ...--  a big prime, like 2^255 - 19\npackage GF_P is new Bigints.Modular (U256, P);\n```\n\nAll functions are implemented in constant time, except those with an explicit `_Vartime` suffix. Overloaded operators are also constant time.\n\n\u003e ⚠️ The constant time choice primitives like `Choice_From_Condition`, `Cond_Select`, `CSwap` rely on best-effort optimisation barriers.\n\n## Tests\n\nThe library is formally checked using `gnatprove`. When contracts are respected, there cannot be any runtime errors.\n\nSome functional contracts try to go a bit further and prove more advanced behaviours (WIP).\n\nTests are implemented in `./tests/src/`. Run them (UNIX only) with\n\n```sh\ncd tests\n./run.sh\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldantanneo%2Fbigints","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faldantanneo%2Fbigints","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldantanneo%2Fbigints/lists"}