{"id":18679133,"url":"https://github.com/mohanson-fork/bn128","last_synced_at":"2025-11-07T13:30:45.020Z","repository":{"id":54774478,"uuid":"327781051","full_name":"libraries/bn128","owner":"libraries","description":"alt_bn128 C++ implements","archived":false,"fork":false,"pushed_at":"2021-01-30T02:57:25.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T21:42:04.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libraries.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-08T02:45:59.000Z","updated_at":"2024-12-03T11:01:46.000Z","dependencies_parsed_at":"2022-08-14T02:30:36.404Z","dependency_job_id":null,"html_url":"https://github.com/libraries/bn128","commit_stats":null,"previous_names":["libraries/bn128"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libraries%2Fbn128","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libraries%2Fbn128/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libraries%2Fbn128/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libraries%2Fbn128/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libraries","download_url":"https://codeload.github.com/libraries/bn128/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239530931,"owners_count":19654385,"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":[],"created_at":"2024-11-07T09:42:27.394Z","updated_at":"2025-11-07T13:30:44.988Z","avatar_url":"https://github.com/libraries.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ALT BN128\n\nThis repo implements the following EIPs on CKB-VM:\n\n- https://github.com/ethereum/EIPs/blob/master/EIPS/eip-196.md\n- https://github.com/ethereum/EIPs/blob/master/EIPS/eip-197.md\n\nThe way to use it is dead simple. You can compile riscv or native results, it depends on you.\n\n**Build for CKB/RISC-V**\n\n```sh\n# Build test\n$ riscv64-unknown-elf-g++ -fno-exceptions -Os -march=rv64gc -Iinclude -Iintx/include -o build/test test/test_bn128.cpp\n\n# Run test on CKB-VM\n$ cd ckb-vm-run\n$ cargo build --release\n$ cd ..\n$ ./ckb-vm-run/target/release/asm build/test\n```\n\n**Build for native**\n\n```sh\n# Build test\n$ g++ -fno-exceptions -Os -Iinclude -Iintx/include -o build/test test/test_bn128.cpp\n\n# Run test on native\n$ ./build/test\n# If the return code is 0, it means that the test has all passed.\n$ echo $?\n```\n\n**Or use the script directly**\n\n```sh\n$ export RISCV=/path/to/riscvdir\n\n$ ./script/test.sh\n$ ./script/test_benchmark.sh\n```\n\nRead the test code to see how to call `add()`, `mul()` and `pairing()`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohanson-fork%2Fbn128","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohanson-fork%2Fbn128","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohanson-fork%2Fbn128/lists"}