Comments (8)
@matthewdgreen I've implemented a list of new opcodes that include the aforementioned types. You can check the full list of new opcodes here: https://github.com/AleoHQ/snarkVM/pull/1576
The Leo team will introduce methods to integrate each of these opcodes soon.
from leo.
Awesome! I am writing a little test "library" that implements: classic Elgamal encryption/decryption, ECIES-like encryption/decryption, Schnorr signatures and an OPRF. These should support all of those cases (I think.)
from leo.
@matthewdgreen we've landed all of the features specified above into Aleo instructions. Leo will be updated over the next 1-2 weeks to support the same features.
- https://github.com/AleoHQ/snarkVM/pull/1594
group::GEN
is now a valid operand
- https://github.com/AleoHQ/snarkVM/pull/1665
cast r0 into r1 as group.x
cast r0 into r1 as group.y
cast r0 into r1 as field
, wherer0
is agroup
.
- https://github.com/AleoHQ/snarkVM/pull/1656
commit.bhp256 r0 r1 into r2 as address;
commit.bhp256 r0 r1 into r2 as field;
commit.bhp256 r0 r1 into r2 as group;
commit.bhp512 ...;
commit.bhp768 ...;
commit.bhp1024 ...;
commit.ped64 ...;
commit.ped128 ...;
hash.bhp256 r0 into r1 as address;
hash.bhp256 r0 into r1 as field;
hash.bhp256 r0 into r1 as group;
hash.bhp256 r0 into r1 as i8;
hash.bhp256 r0 into r1 as i16;
hash.bhp256 r0 into r1 as i32;
hash.bhp256 r0 into r1 as i64;
hash.bhp256 r0 into r1 as i128;
hash.bhp256 r0 into r1 as u8;
hash.bhp256 r0 into r1 as u16;
hash.bhp256 r0 into r1 as u32;
hash.bhp256 r0 into r1 as u64;
hash.bhp256 r0 into r1 as u128;
hash.bhp256 r0 into r1 as scalar;
hash.bhp512 ...;
hash.bhp768 ...;
hash.bhp1024 ...;
hash.ped64 ...;
hash.ped128 ...;
hash.psd2 ...;
hash.psd4 ...;
hash.psd8 ...;
from leo.
Additionally, it would be nice if you could use Poseidon to hash to a group element. (This could be a combination of hashing to a field element and then assigning the field element to the x-coordinate of the group.)
from leo.
Agreed. We should introduce hash_to_group
and hash_to_scalar
for Poseidon. The impls are already in snarkVM.
from leo.
I see this repo and understand the motivation.
We're currently discussing introducing a group::GEN
constant into Aleo instructions and Leo as well, so that there is direct access to the prime subgroup generator.
We're also currently looking into implementing cast
instructions that can take out the x
or y
coordinate as so (in Aleo instructions):
input r0 as group.public;
cast r0 into r1 as group.x;
cast r0 into r2 as group.y;
This would of course then be mirrored in Leo as element.to_x_coordinate()
and element.to_y_coordinate
.
from leo.
We've added the group::GEN
syntax in https://github.com/AleoHQ/snarkVM/pull/1594, which will land in the next snarkVM release today.
from leo.
@matthewdgreen
Leo now supports the features discussed above.
group::to_x_coordinate(a)
ora.to_x_coordinate()
Poseidon2::hash_to_group(a)
group::GEN
The relevant PRs are:
Some relevant examples are:
- https://github.com/AleoHQ/leo/blob/c373b898c4ecc57913e9cd6034668986aabe4ef9/examples/groups/src/main.leo
- https://github.com/AleoHQ/leo/blob/testnet3/tests/tests/execution/group_operations.leo
from leo.
Related Issues (20)
- [Docs]Issue was just closed without any comments and tags
- [Refactor] Propagation of flags in compiler
- iasp
- [Bug] Refactor TYC equality checking
- Aleo contributor badge issue
- [Bug] Non-finalize transitions cause failure HOT 1
- [Proposal]
- [Feature] `self.address` and `network.id` opcodes
- [Bug] Duplicate return value rejected
- [Feature] Reject invalid names for `leo add`
- [Bug] Reading external mapping not working HOT 1
- [Bug] Leo Website is Down
- [Refactor] Condense the leo build flags
- [Bug]
- [Feature] Print number of variables when calling leo run
- [Fix] Remove leo dependency on snarkOS
- [Feature]
- Check that local and network dependencies match for on-chain tools
- [Bug] Compilation Error in Child Program When Referencing Parent Program with Struct
- [Feature] Adding a pseudorandom number generator function to ChaCha that takes in Aleo Address and a uint64 as parameters to generate extremely unrepeatable unique IDs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leo.