Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BLS signatures #1661

Merged
merged 86 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
dd8943b
Add BlsPublicKey definition
lrubasze Nov 29, 2023
45aabaa
Add BLS signature sign/verify support
lrubasze Nov 29, 2023
797929f
Add BLS signature verify bench
lrubasze Nov 29, 2023
0aad1e3
Add BLS key to custom well known types
lrubasze Nov 29, 2023
4bf4de3
Implement Describe<ScryptoCustomTypeKind> for BLS types
lrubasze Nov 29, 2023
d96dc45
Add tests for BLS custom types
lrubasze Nov 29, 2023
08db1a7
Move crypto primitives to radix-engine-common
lrubasze Dec 1, 2023
57e9710
Fix compilation issues in radix-engine-tests
lrubasze Dec 1, 2023
205d905
Add CryptoUtils API to ClientAPI
lrubasze Dec 4, 2023
e98f943
Test CryptoUtils API with CryptoScrypto blueprint
lrubasze Dec 4, 2023
ae69bd1
Install clang in CI
lrubasze Dec 4, 2023
03568e4
Fix no_std
lrubasze Dec 4, 2023
bc73b06
Fix compilation issues in radix-engine-tests
lrubasze Dec 4, 2023
17c06aa
Remove warning
lrubasze Dec 4, 2023
5e34677
Add TODO note
lrubasze Dec 4, 2023
1ba5467
Fix simulator
lrubasze Dec 4, 2023
a0a0fbd
Disable 'global-context' for secp2561 as it enforces 'std'
lrubasze Dec 5, 2023
be6baa8
Use setup-env action in Benchmark PR GH action
lrubasze Dec 5, 2023
8e5f93e
Fix tests when 'compile-blueprints-at-build-time' enabled
lrubasze Dec 5, 2023
a37e6f6
Add bls_verify() and keccak_hash() to wasmer
lrubasze Dec 5, 2023
0262df0
Get rid of crypto-related dependencies for WASM target
lrubasze Dec 5, 2023
10f2f77
Add support for Keccak256 hash
lrubasze Dec 5, 2023
89a9aca
Switch keccak_hash() to real Keccak256 hash
lrubasze Dec 5, 2023
5321cfe
Fix return type of crypto_utils_bls_verify
lrubasze Dec 5, 2023
27f3e8d
Add BlsSignature to well known types
lrubasze Dec 6, 2023
26852a4
Moved some general abstraction objects back to 'transaction'
lrubasze Dec 6, 2023
d5b87cd
Move crypto methods to the separated 'CryptoUtils' struct in Scrypto API
lrubasze Dec 6, 2023
dfb5c6a
Let BLS verify accept messages of arbitrary length
lrubasze Dec 6, 2023
31599df
Fix no_std
lrubasze Dec 6, 2023
d01014a
Fix formatting
lrubasze Dec 6, 2023
61f4d88
Change BLS scheme to the one used by Supra
lrubasze Dec 7, 2023
59fc327
Rename BLS related stuff more specifically
lrubasze Dec 8, 2023
61ae645
Rename Keccak related stuff more specifically
lrubasze Dec 8, 2023
206d65b
Add rust docs to CryptoUtils
lrubasze Dec 8, 2023
f2232d9
Merge branch 'develop' into feature/bls_signatures
lrubasze Jan 9, 2024
f95d5b3
Limit SECP256K1_CTX visibility to current crate
lrubasze Jan 9, 2024
b212d0e
Remove BLS types from SBOR well-known types
lrubasze Jan 11, 2024
066448d
Enable crypto features for wasm32 target as well
lrubasze Jan 9, 2024
c9b75af
Add llvm to GH path
lrubasze Jan 11, 2024
69d1642
Update README to install llvm for MacOS
lrubasze Jan 11, 2024
0a7b51b
Add support for BLS aggregated signatures and public keys
lrubasze Dec 19, 2023
f3fad9f
Fixes for WASM and cleanup
lrubasze Dec 20, 2023
6d982d0
Improve resource tracing for CryptoUtils API
lrubasze Dec 19, 2023
453131e
Add bls12381_g2_signature_aggregate() to CryptoUtils API
lrubasze Dec 20, 2023
7001c43
Implement Display for ParseBlsSignatureError
lrubasze Dec 20, 2023
dc740bd
Finish adding bls12381_g2_signature_aggregate() to CryptoUtils API
lrubasze Dec 20, 2023
3eb85d6
Test bls12381_g2_signature_aggregate()
lrubasze Dec 20, 2023
7c89f75
Add TODO costing note
lrubasze Dec 21, 2023
f79fadf
Use references in ClientCryptoUtilsApi
lrubasze Dec 21, 2023
9c2728a
Add bls12381_v1_aggregate_verify() to CryptoUtils API
lrubasze Dec 21, 2023
01ac0ca
Cleanup in crypto_utils tests
lrubasze Dec 21, 2023
088307e
Add bls12381_v1_aggregate_verify() to CryptoUtils API
lrubasze Dec 21, 2023
6f88c1b
Test bls12381_v1_aggregate_verify()
lrubasze Dec 21, 2023
65621f5
Fix resources tracing
lrubasze Dec 21, 2023
e49d3a2
Add bls12381_v1_fast_aggregate_verify() to CryptoUtils API
lrubasze Dec 21, 2023
101cc14
Test bls12381_v1_fast_aggregate_verify()
lrubasze Dec 21, 2023
d3bda78
Temporarily set dummy resources tracing for bls12381_v1_aggregate_verify
lrubasze Dec 21, 2023
1dc2b4d
Comment fixed
lrubasze Dec 21, 2023
fc27033
Fix resources tracing for bls12381_v1_aggregate_verify
lrubasze Jan 4, 2024
385ea47
Add more Keccak256 and BLS12381 tests for costing
lrubasze Jan 4, 2024
d5e469a
Disabled cpu parameter in qemu call due to some incompatibility issues.
mstrug-rdx Dec 18, 2023
46407f6
Add Keccak256 and Bls12381 costing basing on benches
lrubasze Dec 18, 2023
b18f6d8
Rework Keccak256 and Bls12381 costing to rely on instruction count
lrubasze Jan 4, 2024
35a4762
Add costing for remaining Bls12381 methods
lrubasze Jan 5, 2024
7cf8a5a
Check for empty input
lrubasze Jan 5, 2024
24385f6
Tests for empty input
lrubasze Jan 5, 2024
1c7f32e
Minor improvements in crypto_utils tests
lrubasze Jan 9, 2024
8590fd3
Remove unused import
lrubasze Jan 9, 2024
2bd9818
Refactor BLS aggregate verify API
lrubasze Jan 10, 2024
900e73c
Use SBOR for data carried in CryptoUtils API
lrubasze Jan 10, 2024
5cc3fce
Rename some error
lrubasze Jan 10, 2024
fbfc02d
Tweak costing for aggregate verify
lrubasze Jan 10, 2024
c6e2f13
Update BLS aggregate verify API in wasmer
lrubasze Jan 10, 2024
50535cd
Add more aggregate verify costing tests
lrubasze Jan 10, 2024
f2cc6de
Update aggregated verify costs
lrubasze Jan 11, 2024
7c6f79d
Reenable crypto features for wasm32 target as well
lrubasze Jan 11, 2024
eca021b
Temporarily disable BLS aggregate verify
lrubasze Jan 11, 2024
7b9cd04
Merge pull request #1666 from radixdlt/feature/crypto_utils_aggregate
lrubasze Jan 12, 2024
cea6713
Merge branch 'develop' into feature/bls_signatures
lrubasze Jan 12, 2024
fd5a530
Add minor version checks for Crypto Utils
talekhinezh Jan 12, 2024
a680b8f
Add StateUpdate generation for Scrypto CryptoUtils
talekhinezh Jan 12, 2024
7bfa8a2
Add Crypto Utils flash test
talekhinezh Jan 12, 2024
b1bf2a6
Cleanup format
talekhinezh Jan 12, 2024
284aa45
Some cleanup
talekhinezh Jan 12, 2024
025de3d
Merge pull request #1675 from radixdlt/feature/add-protocol-update-to…
talekhinezh Jan 12, 2024
cee6e52
Some cleanup including removal of new HASH custom well known type
talekhinezh Jan 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ runs:
cmake-version: '3.27.9'
- name: Install libclang-dev
if: runner.os == 'Linux'
run: sudo apt-get install libclang-dev -y -f
run: sudo apt-get -y update && sudo apt-get install clang libclang-dev -y -f
shell: bash
- name: Setup LLVM
if: runner.os == 'macOS'
# Switch to more recent LLVM/Clang 15.0.7
# see: https://github.com/actions/runner-images/blob/macOS-12/20240105.3/images/macos/macos-12-Readme.md
run: echo "$(brew --prefix llvm@15)/bin" >> $GITHUB_PATH
shell: bash

11 changes: 2 additions & 9 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,8 @@ jobs:
runs-on: gh-runner-scrypto-ubuntu-jammy-16-cores
steps:
- uses: RDXWorks-actions/checkout@main
- name: Setup cmake
uses: RDXWorks-actions/actions-setup-cmake@master
with:
cmake-version: '3.27.9'
- uses: RDXWorks-actions/toolchain@master
with:
toolchain: stable
- name: Add wasm target
run: rustup target add wasm32-unknown-unknown
- name: Setup environment
uses: ./.github/actions/setup-env
- uses: radixdlt/criterion-compare-action@update-same-commit
with:
branchName: ${{ github.base_ref }}
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ Binaries, including libraries, CLIs and docker images, are licensed under the [R
```
- macOS:
- Make sure you have the xcode command line tools: `xcode-select --install`.
- Install cmake: `brew install cmake`
- Install cmake: `brew install cmake llvm`<br>
Add LLVM to the system path by adding below line to the `~/.profile`
```
PATH="/opt/homebrew/opt/llvm/bin:$PATH"
```
- Install the Rust compiler:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Expand Down
46 changes: 44 additions & 2 deletions assets/blueprints/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading