├── .github └── workflows │ └── tests.yml ├── .gitignore ├── .gitmodules ├── .travis.yml ├── CMakeLists.txt ├── LICENSE ├── Makefile ├── Makefile.clang ├── README.md ├── blst ├── blst.patch ├── blst_mul_mont_384.riscv.S └── blst_mul_mont_384x.riscv.S ├── c ├── and.c ├── blockchain.mol ├── bls12_381_sighash_all.c ├── common.h ├── dual.syms ├── htlc.c ├── libecc_helper.h ├── libecc_nn_mul_redc1.c ├── ll_u256_mont-riscv64.S ├── ll_u256_mont_mul.c ├── open_transaction.c ├── or.c ├── or.h ├── or.mol ├── rc_lock.mol ├── rc_lock_mol.h ├── rc_lock_mol2.h ├── rsa.syms ├── rsa_sighash_all.c ├── rsa_sighash_all.h ├── secp256k1_blake2b_sighash_all_dual.c ├── secp256k1_blake2b_sighash_all_lib.c ├── secp256r1_bench.c ├── secp256r1_blake160_sighash_all.c ├── secp256r1_blake160_sighash_bench.c ├── secp256r1_helper.h └── simple_udt.c ├── deps ├── blake2b.h ├── dump_secp256k1_data.c ├── generate_data_hash.c ├── mbedtls-config-template.h ├── secp256k1_helper.h └── sha256.h ├── docs ├── c │ ├── open_transaction.html │ ├── secp256k1_blake2b_sighash_all_dual.html │ └── simple_udt.html ├── docco.css ├── libecc-optimization-notes │ ├── README.md │ ├── _nn_mul_redc1.source.disasm │ └── secp256r1_blake160_sighash_lay2dev_bench.svg └── public │ ├── fonts │ ├── aller-bold.eot │ ├── aller-bold.ttf │ ├── aller-bold.woff │ ├── aller-light.eot │ ├── aller-light.ttf │ ├── aller-light.woff │ ├── roboto-black.eot │ ├── roboto-black.ttf │ └── roboto-black.woff │ └── stylesheets │ └── normalize.css ├── simulator ├── README.md ├── data │ ├── data.json │ ├── data2.json │ ├── data3.json │ ├── original.json │ ├── original2.json │ ├── original3.json │ ├── sudt.json │ ├── sudt_data.json │ └── test.json └── run-simulator.sh ├── tests ├── blst │ ├── CMakeLists.txt │ └── main.c ├── blst_rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── src │ │ ├── lib.rs │ │ └── rc_lock.rs │ └── tests │ │ ├── misc.rs │ │ └── test_blst.rs ├── secp256r1_blake160 │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── lib.rs │ │ └── tests │ │ ├── mod.rs │ │ └── secp256r1_blake160_sighash_all.rs └── secp256r1_blake160_c │ └── main.c └── tools └── pprof.py /.github/workflows/tests.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/.github/workflows/tests.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/.gitmodules -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/.travis.yml -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/CMakeLists.txt -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/Makefile -------------------------------------------------------------------------------- /Makefile.clang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/Makefile.clang -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/README.md -------------------------------------------------------------------------------- /blst/blst.patch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/blst/blst.patch -------------------------------------------------------------------------------- /blst/blst_mul_mont_384.riscv.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/blst/blst_mul_mont_384.riscv.S -------------------------------------------------------------------------------- /blst/blst_mul_mont_384x.riscv.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/blst/blst_mul_mont_384x.riscv.S -------------------------------------------------------------------------------- /c/and.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/and.c -------------------------------------------------------------------------------- /c/blockchain.mol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/blockchain.mol -------------------------------------------------------------------------------- /c/bls12_381_sighash_all.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/bls12_381_sighash_all.c -------------------------------------------------------------------------------- /c/common.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/common.h -------------------------------------------------------------------------------- /c/dual.syms: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/dual.syms -------------------------------------------------------------------------------- /c/htlc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/htlc.c -------------------------------------------------------------------------------- /c/libecc_helper.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/libecc_helper.h -------------------------------------------------------------------------------- /c/libecc_nn_mul_redc1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/libecc_nn_mul_redc1.c -------------------------------------------------------------------------------- /c/ll_u256_mont-riscv64.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/ll_u256_mont-riscv64.S -------------------------------------------------------------------------------- /c/ll_u256_mont_mul.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/ll_u256_mont_mul.c -------------------------------------------------------------------------------- /c/open_transaction.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/open_transaction.c -------------------------------------------------------------------------------- /c/or.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/or.c -------------------------------------------------------------------------------- /c/or.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/or.h -------------------------------------------------------------------------------- /c/or.mol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/or.mol -------------------------------------------------------------------------------- /c/rc_lock.mol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/rc_lock.mol -------------------------------------------------------------------------------- /c/rc_lock_mol.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/rc_lock_mol.h -------------------------------------------------------------------------------- /c/rc_lock_mol2.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/rc_lock_mol2.h -------------------------------------------------------------------------------- /c/rsa.syms: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/rsa.syms -------------------------------------------------------------------------------- /c/rsa_sighash_all.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/rsa_sighash_all.c -------------------------------------------------------------------------------- /c/rsa_sighash_all.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/rsa_sighash_all.h -------------------------------------------------------------------------------- /c/secp256k1_blake2b_sighash_all_dual.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/secp256k1_blake2b_sighash_all_dual.c -------------------------------------------------------------------------------- /c/secp256k1_blake2b_sighash_all_lib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/secp256k1_blake2b_sighash_all_lib.c -------------------------------------------------------------------------------- /c/secp256r1_bench.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/secp256r1_bench.c -------------------------------------------------------------------------------- /c/secp256r1_blake160_sighash_all.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/secp256r1_blake160_sighash_all.c -------------------------------------------------------------------------------- /c/secp256r1_blake160_sighash_bench.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/secp256r1_blake160_sighash_bench.c -------------------------------------------------------------------------------- /c/secp256r1_helper.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/secp256r1_helper.h -------------------------------------------------------------------------------- /c/simple_udt.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/c/simple_udt.c -------------------------------------------------------------------------------- /deps/blake2b.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/deps/blake2b.h -------------------------------------------------------------------------------- /deps/dump_secp256k1_data.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/deps/dump_secp256k1_data.c -------------------------------------------------------------------------------- /deps/generate_data_hash.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/deps/generate_data_hash.c -------------------------------------------------------------------------------- /deps/mbedtls-config-template.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/deps/mbedtls-config-template.h -------------------------------------------------------------------------------- /deps/secp256k1_helper.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/deps/secp256k1_helper.h -------------------------------------------------------------------------------- /deps/sha256.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/deps/sha256.h -------------------------------------------------------------------------------- /docs/c/open_transaction.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/c/open_transaction.html -------------------------------------------------------------------------------- /docs/c/secp256k1_blake2b_sighash_all_dual.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/c/secp256k1_blake2b_sighash_all_dual.html -------------------------------------------------------------------------------- /docs/c/simple_udt.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/c/simple_udt.html -------------------------------------------------------------------------------- /docs/docco.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/docco.css -------------------------------------------------------------------------------- /docs/libecc-optimization-notes/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/libecc-optimization-notes/README.md -------------------------------------------------------------------------------- /docs/libecc-optimization-notes/_nn_mul_redc1.source.disasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/libecc-optimization-notes/_nn_mul_redc1.source.disasm -------------------------------------------------------------------------------- /docs/libecc-optimization-notes/secp256r1_blake160_sighash_lay2dev_bench.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/libecc-optimization-notes/secp256r1_blake160_sighash_lay2dev_bench.svg -------------------------------------------------------------------------------- /docs/public/fonts/aller-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/public/fonts/aller-bold.eot -------------------------------------------------------------------------------- /docs/public/fonts/aller-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/public/fonts/aller-bold.ttf -------------------------------------------------------------------------------- /docs/public/fonts/aller-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/public/fonts/aller-bold.woff -------------------------------------------------------------------------------- /docs/public/fonts/aller-light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/public/fonts/aller-light.eot -------------------------------------------------------------------------------- /docs/public/fonts/aller-light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/public/fonts/aller-light.ttf -------------------------------------------------------------------------------- /docs/public/fonts/aller-light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/public/fonts/aller-light.woff -------------------------------------------------------------------------------- /docs/public/fonts/roboto-black.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/public/fonts/roboto-black.eot -------------------------------------------------------------------------------- /docs/public/fonts/roboto-black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/public/fonts/roboto-black.ttf -------------------------------------------------------------------------------- /docs/public/fonts/roboto-black.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/public/fonts/roboto-black.woff -------------------------------------------------------------------------------- /docs/public/stylesheets/normalize.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/docs/public/stylesheets/normalize.css -------------------------------------------------------------------------------- /simulator/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/simulator/README.md -------------------------------------------------------------------------------- /simulator/data/data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/simulator/data/data.json -------------------------------------------------------------------------------- /simulator/data/data2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/simulator/data/data2.json -------------------------------------------------------------------------------- /simulator/data/data3.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/simulator/data/data3.json -------------------------------------------------------------------------------- /simulator/data/original.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/simulator/data/original.json -------------------------------------------------------------------------------- /simulator/data/original2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/simulator/data/original2.json -------------------------------------------------------------------------------- /simulator/data/original3.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/simulator/data/original3.json -------------------------------------------------------------------------------- /simulator/data/sudt.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/simulator/data/sudt.json -------------------------------------------------------------------------------- /simulator/data/sudt_data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/simulator/data/sudt_data.json -------------------------------------------------------------------------------- /simulator/data/test.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/simulator/data/test.json -------------------------------------------------------------------------------- /simulator/run-simulator.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/simulator/run-simulator.sh -------------------------------------------------------------------------------- /tests/blst/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/blst/CMakeLists.txt -------------------------------------------------------------------------------- /tests/blst/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/blst/main.c -------------------------------------------------------------------------------- /tests/blst_rust/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/blst_rust/Cargo.lock -------------------------------------------------------------------------------- /tests/blst_rust/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/blst_rust/Cargo.toml -------------------------------------------------------------------------------- /tests/blst_rust/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod rc_lock; 2 | -------------------------------------------------------------------------------- /tests/blst_rust/src/rc_lock.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/blst_rust/src/rc_lock.rs -------------------------------------------------------------------------------- /tests/blst_rust/tests/misc.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/blst_rust/tests/misc.rs -------------------------------------------------------------------------------- /tests/blst_rust/tests/test_blst.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/blst_rust/tests/test_blst.rs -------------------------------------------------------------------------------- /tests/secp256r1_blake160/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/secp256r1_blake160/Cargo.lock -------------------------------------------------------------------------------- /tests/secp256r1_blake160/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/secp256r1_blake160/Cargo.toml -------------------------------------------------------------------------------- /tests/secp256r1_blake160/build.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/secp256r1_blake160/build.rs -------------------------------------------------------------------------------- /tests/secp256r1_blake160/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/secp256r1_blake160/src/lib.rs -------------------------------------------------------------------------------- /tests/secp256r1_blake160/src/tests/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/secp256r1_blake160/src/tests/mod.rs -------------------------------------------------------------------------------- /tests/secp256r1_blake160/src/tests/secp256r1_blake160_sighash_all.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/secp256r1_blake160/src/tests/secp256r1_blake160_sighash_all.rs -------------------------------------------------------------------------------- /tests/secp256r1_blake160_c/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tests/secp256r1_blake160_c/main.c -------------------------------------------------------------------------------- /tools/pprof.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nervosnetwork/ckb-miscellaneous-scripts/HEAD/tools/pprof.py --------------------------------------------------------------------------------