leo/examples/groups
Pranav Gaddamadugu f22177e2c5 Set defaults
2024-07-08 09:30:10 -07:00
..
build [Feature] Implement leo execute (#2491) 2023-07-19 18:04:09 -07:00
inputs WIP removing input files from examples 2024-01-15 15:45:07 -08:00
src implement group::GEN Leo syntax (#2401) 2023-05-31 16:05:56 -07:00
.env Set defaults 2024-07-08 09:30:10 -07:00
.gitignore [Feature] Implement leo execute (#2491) 2023-07-19 18:04:09 -07:00
leo.lock make example compatible w/ stubs 2023-12-11 13:19:42 -08:00
program.json [Feature] Implement leo execute (#2491) 2023-07-19 18:04:09 -07:00
README.md Update examples and CI 2024-01-15 15:45:08 -08:00

Leo group operations.

Run Guide

To run this program, run:

leo run main <inputs>

Execute Guide

To execute this program, run:

leo execute main <inputs>

Overview

This example shows how to do basic operations over groups.

It takes the input data from inputs/groups.in

Documentation Group Element

The set of affine points on the elliptic curve passed into the Leo compiler forms a group. A subset of those points, defined by a chosen generator point, forms a subgroup of the group. Leo supports the set of points in this subgroup as a primitive data type. Group elements are special since their values can be defined as coordinate pairs (x, y)group. The group type keyword group must be used when specifying a pair of group coordinates since implicit syntax would collide with normal tuple (a, b) values.

let a = 0group; // the zero of the group

let b = group::GEN; // the group generator

let c = (0, 1)group; // coordinate notation