### Installing Rust on macOS/Linux Source: https://github.com/provablehq/snarkvm/blob/staging/README.md This command installs `rustup`, the official Rust toolchain installer, on macOS or Linux systems. It downloads and executes the `rustup` installation script from the official Rust website, setting up the Rust development environment necessary for building Rust projects. ```Bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Installing snarkVM from Local Source Source: https://github.com/provablehq/snarkvm/blob/staging/README.md This command compiles and installs the `snarkvm` binary from the current local source directory. It is used after cloning the repository and allows for development and testing with the latest or specific versions of the source code. ```Bash cargo install --path . ``` -------------------------------- ### Running snarkVM after Crates.io Installation Source: https://github.com/provablehq/snarkvm/blob/staging/README.md This command executes the `snarkvm` binary after it has been successfully installed via `cargo install` from `crates.io`. It serves as a basic invocation to verify the installation and begin using the `snarkvm` command-line tool. ```Bash snarkvm ``` -------------------------------- ### Installing snarkVM from Crates.io Source: https://github.com/provablehq/snarkvm/blob/staging/README.md This command installs the `snarkvm` binary directly from `crates.io`, Rust's official package registry. It is the recommended and simplest method for installing `snarkvm` and requires Rust and Cargo to be pre-installed on the system. ```Bash cargo install snarkvm ``` -------------------------------- ### Running snarkVM after Source Installation Source: https://github.com/provablehq/snarkvm/blob/staging/README.md This command executes the `snarkvm` binary after it has been successfully compiled and installed from the local source code. It is a basic invocation to confirm the build process and begin interacting with the `snarkvm` tool. ```Bash snarkvm ``` -------------------------------- ### Example Aleo Test Program Structure Source: https://github.com/provablehq/snarkvm/blob/staging/synthesizer/tests/README.md This snippet illustrates the structure of a test file in the `snarkvm` framework. It includes a YAML-like configuration in a leading comment block, defining `randomness` and `cases` for test execution, followed by an Aleo program with `record` and `function` definitions (`mint` and `split`). The configuration specifies function calls, inputs, and optional private keys for each test case. ```Aleo /* randomness: 1337 cases: - function: mint inputs: [aleo1j2hfs6yru47h2nvsjdefwtw6nwaj0y4zcl02juyy29txm7nt6y9qln7uhp, 100u64] - function: split inputs: [ "{ owner: aleo1j2hfs6yru47h2nvsjdefwtw6nwaj0y4zcl02juyy29txm7nt6y9qln7uhp.private, microcredits: 100u64.private, _nonce: 0group.public }", 50u64] private_key: APrivateKey1zkpFbGDx4znwxo1zrxfUscfGn1Vy3My3ia5gRHx3XwaLtCR - function: split inputs: [ "{ owner: aleo1j2hfs6yru47h2nvsjdefwtw6nwaj0y4zcl02juyy29txm7nt6y9qln7uhp.private, microcredits: 100u64.private, _nonce: 0group.public }", 50u64] private_key: APrivateKey1zkpJhviKDvvm7yu7SZuhSudVR7zjCRG2HznuAHwuGYc1xqN */ program mint_and_split.aleo; record credits: owner as address.private; microcredits as u64.private; function mint: input r0 as address.public; input r1 as u64.public; cast r0 r1 into r2 as credits.record; output r2 as credits.record; function split: input r0 as credits.record; input r1 as u64.private; sub r0.microcredits r1 into r2; cast r0.owner r1 into r3 as credits.record; cast r0.owner r2 into r4 as credits.record; output r3 as credits.record; output r4 as credits.record; ``` -------------------------------- ### Epoch Program Pseudocode Inputs and Initialization Source: https://github.com/provablehq/snarkvm/blob/staging/ledger/puzzle/epoch/docs/spec.md This pseudocode outlines the inputs required for an epoch program, including an address, epoch hash, counter, and puzzle target. It then shows the initialization of an EpochProgram instance using the epoch_hash. This snippet provides a high-level overview of the data flow and initial setup for an epoch-based program within the system. ```Pseudocode ############################################################################# # Inputs ############################################################################# # The address to be rewarded Address address # The block hash of the latest epoch N::Blockhash epoch_hash # The counter u64 counter # The target difficulty u64 puzzle_target ############################################################################# # Sample the epoch program, once per epoch ############################################################################# EpochProgram program = EpochProgram::new(epoch_hash) ############################################################################# ``` -------------------------------- ### Aleo Register Table Initialization Preamble Source: https://github.com/provablehq/snarkvm/blob/staging/ledger/puzzle/epoch/docs/spec.md This Aleo code snippet defines the preamble for initializing the register table. It declares public inputs of various literal types (boolean, i8-i128, field) and then performs a series of equality checks, PSD2 hashes, multiplications, and ternary operations. This setup populates the register table with initial values and derived computations, demonstrating the initial state for program execution. ```Aleo input r0 as boolean.public; input r1 as boolean.public; input r2 as i8.public; input r3 as i8.public; input r4 as i16.public; input r5 as i16.public; input r6 as i32.public; input r7 as i32.public; input r8 as i64.public; input r9 as i64.public; input r10 as i128.public; input r11 as i128.public; input r12 as field.public; input r13 as field.public; is.eq r1 r0 into r14; is.eq r3 r2 into r15; is.eq r5 r4 into r16; is.eq r7 r6 into r17; is.eq r9 r8 into r18; is.eq r11 r10 into r19; hash.psd2 r12 into r20 as u8; hash.psd2 r13 into r21 as u8; hash.psd2 r12 into r22 as u16; hash.psd2 r13 into r23 as u16; hash.psd2 r12 into r24 as u32; hash.psd2 r13 into r25 as u32; hash.psd2 r12 into r26 as u64; hash.psd2 r13 into r27 as u64; hash.psd2 r12 into r28 as u128; hash.psd2 r13 into r29 as u128; mul.w r3 r2 into r30; mul.w r5 r4 into r31; mul.w r7 r6 into r32; mul.w r9 r8 into r33; mul.w r11 r10 into r34; ternary r15 r30 r2 into r35; ternary r16 r31 r4 into r36; ternary r17 r32 r6 into r37; ternary r18 r33 r8 into r38; ternary r19 r34 r10 into r39; ``` -------------------------------- ### Example Instruction Sequence in Rust Source: https://github.com/provablehq/snarkvm/blob/staging/ledger/puzzle/epoch/docs/spec.md This Rust snippet defines a sequence of three instructions: IsEq, Ternary, and Div. It demonstrates how operands and destinations are specified for each instruction, illustrating a common pattern for defining operations within the SNARKVM instruction set. The sequence performs a check for equality to zero, a conditional selection, and a division operation, managing ephemeral and register-based values. ```Rust (vec![ (Instruction::IsEq, vec![ Operand::Register(LiteralType::Field), Operand::Literal(Literal::Field(Field::zero()))], vec![ Destination::Ephemeral(LiteralType::Boolean, 0) ]), (Instruction::Ternary, vec![ Operand::Ephemeral(LiteralType::Boolean, 0), Operand::Input(LiteralType::Field, 0), Operand::Register(LiteralType::Field)], vec![ Destination::Ephemeral(LiteralType::Field, 1)]), (Instruction::Div, vec![ Operand::RegisterOffset(LiteralType::Field, 1), Operand::Ephemeral(LiteralType::Field, 1)], vec![Destination::Register(LiteralType::Field)])], VERY_LOW) ``` -------------------------------- ### Cloning and Checking Out snarkVM Source Code Source: https://github.com/provablehq/snarkvm/blob/staging/README.md These commands download the `snarkVM` source code from its GitHub repository, navigate into the newly cloned directory, and then switch to the `testnet-beta` tag. This is the initial step for building `snarkvm` directly from its source code. ```Bash git clone --branch mainnet --single-branch https://github.com/ProvableHQ/snarkVM.git cd snarkVM git checkout tags/testnet-beta ``` -------------------------------- ### Running All SnarkVM Tests Source: https://github.com/provablehq/snarkvm/blob/staging/synthesizer/tests/README.md This command executes all integration tests within the `snarkvm` project using `cargo test`. It's the general command for running the entire test suite. ```Shell cargo test --test '*' ``` -------------------------------- ### Enabling Profiling for Varuna in Rust Source: https://github.com/provablehq/snarkvm/blob/staging/algorithms/src/snark/varuna/README.md This command compiles the `varuna` library with the `profiler` feature enabled. This allows the library to print detailed execution time traces, which is useful for performance analysis and debugging. It requires the Rust toolchain and Cargo. ```Shell cargo build --features profiler ``` -------------------------------- ### Running Benchmarks with CUDA Feature in Rust Source: https://github.com/provablehq/snarkvm/blob/staging/algorithms/cuda/README.md This command-line snippet demonstrates how to execute benchmarks for `snarkvm-algorithms` while enabling the `cuda` feature. It first navigates to the `snarkVM/algorithms` directory and then runs `cargo bench` with the specified benchmark (`variable_base`) and the `cuda` feature flag. This is essential for evaluating the performance benefits of CUDA acceleration. ```Shell cd snarkVM/algorithms cargo bench --bench variable_base --features "cuda" ``` -------------------------------- ### Merkle Puzzle Solution Construction (Program-Based Inputs) - Pseudocode Source: https://github.com/provablehq/snarkvm/blob/staging/ledger/puzzle/epoch/docs/spec.md This pseudocode describes an iterative algorithm to find a valid Merkle puzzle solution. It generates a unique nonce, seeds an RNG, and then constructs program-specific inputs which are subsequently converted into Merkle tree leaves. The Merkle root is computed from these leaves, and a target value is derived. The process repeats until the calculated target meets the `puzzle_target`. ```Pseudocode counter = 0 while (1) # Generate nonce for the RNG # Note, this nonce should be unique to **all** attempts u64 nonce = sha2(sha2(address, epoch_hash, counter)).to_u64() # Seed the RNG using nonce rng = chacha(nonce) # Construct the inputs to the program Vec inputs = program.construct_inputs(rng) # Construct the leaves of the Merkle Tree Vec> leaves = program.to_leaves(inputs); # Generate the root of a SHA3-256 Merkle Tree with arity 8 over the leaves u256 root = merkle_tree(leaves) # Get the lower 64 bits of the root u64 root_as_u64 = root.to_u64() # Compute the target u64 target = if root_as_u64 == 0u64 { u64::MAX } else { u64::MAX / root_as_u64 } # If the candidate does not meet the target, try again if target < puzzle_target counter++ next return (counter, root) ``` -------------------------------- ### Complete Merkle Puzzle Solution with Epoch-Based Leaf Sampling - Pseudocode Source: https://github.com/provablehq/snarkvm/blob/staging/ledger/puzzle/epoch/docs/spec.md This comprehensive pseudocode outlines the full Merkle puzzle solution process. It defines required inputs such as `address`, `epoch_hash`, `counter`, and `puzzle_target`. It includes a preliminary step to sample the number of Merkle leaves (`num_leaves`) once per epoch using the `epoch_hash`. The main loop then iteratively generates a nonce, seeds an RNG, samples leaves based on `num_leaves`, computes the Merkle root, and derives a target, repeating until the `puzzle_target` is met. ```Pseudocode ############################################################################# # Inputs ############################################################################# # The address to be rewarded Address address # The block hash of the latest epoch N::Blockhash epoch_hash # The counter u64 counter # The target difficulty u64 puzzle_target ############################################################################# # Sample the number of leaves in the Merkle Tree, once per epoch ############################################################################# # Seed the RNG using the lower 64 bits of the epoch hash u64 epoch_hash_as_u64 = epoch_hash.to_u64() epoch_rng = chacha(epoch_hash_to_u64) # Sample the number of leaves u32 num_leaves = epoch_rng.sample_range(100000, 200000) ############################################################################# # Construct a valid solution ############################################################################# counter = 0 while (1) # Generate nonce for the RNG # Note, this nonce should be unique to **all** attempts u64 nonce = sha2(sha2(addr, epoch_hash, counter)).to_u64() # Seed the RNG using nonce rng = chacha(nonce) # Construct the leaves of the Merkle Tree Vec> leaves = rng.sample_leaves(num_leaves) # Generate the root of a SHA3-256 Merkle Tree with arity 8 over the leaves u256 root = merkle_tree(leaves) # Get the lower 64 bits of the root u64 root_as_u64 = root.to_u64() # Compute the target u64 target = if root_as_u64 == 0u64 { u64::MAX } else { u64::MAX / root_as_u64 } # If the candidate does not meet the target, try again if target < puzzle_target counter++ next return (counter, root) ``` -------------------------------- ### Running Filtered SnarkVM Tests Source: https://github.com/provablehq/snarkvm/blob/staging/synthesizer/tests/README.md This command allows running a subset of tests by filtering test files based on a query string. It's useful for focusing on specific tests, especially since the `vm_execute_and_finalize` test can be time-consuming. The `TEST_FILTER` environment variable is used for this purpose. ```Shell TEST_FILTER= cargo test --test '*' ``` -------------------------------- ### Running Specific SnarkVM Test Namespace Source: https://github.com/provablehq/snarkvm/blob/staging/synthesizer/tests/README.md This command allows running tests within a specific namespace or test file. It's useful for targeting individual test runners, such as `test_program_parse`, and can be combined with other flags like `TEST_FILTER` or `REWRITE_EXPECTATIONS`. ```Shell cargo test --test '' // Example cargo test --test 'test_program_parse' ``` -------------------------------- ### Enabling CUDA Feature in Cargo.toml for Rust Dependency Source: https://github.com/provablehq/snarkvm/blob/staging/algorithms/cuda/README.md This TOML configuration snippet illustrates how to declare `snarkvm` as a dependency in a Rust project's `Cargo.toml` file and enable its `cuda` feature. By specifying `features = ["cuda"]`, the project will compile `snarkvm` with CUDA support, allowing it to utilize GPU acceleration for its functionalities. This is a common way to manage optional features in Rust dependencies. ```TOML [dependencies.snarkvm] version = "" features = ["cuda"] ``` -------------------------------- ### Regenerating SnarkVM Test Expectations Source: https://github.com/provablehq/snarkvm/blob/staging/synthesizer/tests/README.md This command regenerates the expectation files for the tests. It can be combined with the `TEST_FILTER` flag to regenerate expectations for specific tests, ensuring that the expected outputs are up-to-date with current test logic. ```Shell REWRITE_EXPECTATIONS=1 cargo test --test '*' ``` -------------------------------- ### Base Field Root of Unity - U64 Little-Endian Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the U64 little-endian array representation of the root of unity for the Base Field used in SNARKVM. This format is optimized for low-level implementations. ```Plain Text [4340692304772210610, 11102725085307959083, 15540458298643990566, 944526744080888988] ``` -------------------------------- ### Base Field Modulus - U64 Little-Endian Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the U64 little-endian array representation of the modulus for the Base Field used in SNARKVM. This format facilitates efficient computation in 64-bit environments. ```Plain Text [725501752471715841, 6461107452199829505, 6968279316240510977, 1345280370688173398] ``` -------------------------------- ### Base Field Root of Unity - Integer Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the integer representation of the root of unity for the Base Field used in SNARKVM. It is essential for various polynomial arithmetic operations. ```Plain Text 5928890464389279575069867463136436689218492512582288454256978381122364252082 ``` -------------------------------- ### Scalar Field Root of Unity Integer Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the integer representation of the root of unity for the scalar field. The root of unity is a critical component for Fast Fourier Transforms (FFTs) and polynomial arithmetic within zero-knowledge proofs. ```Numerical Representation 5928890464389279575069867463136436689218492512582288454256978381122364252082 ``` -------------------------------- ### Scalar Field Root of Unity - U64 Little-Endian Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the U64 little-endian array representation of the root of unity for the Scalar Field used in SNARKVM. This format is optimized for 64-bit arithmetic operations. ```Plain Text [15170730761708361161, 13670723686578117817, 12803492266614043665, 50861023252832611] ``` -------------------------------- ### Scalar Field Root of Unity - Integer Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the integer representation of the root of unity for the Scalar Field used in SNARKVM. This constant is crucial for polynomial evaluations and FFT-based operations. ```Plain Text 319259817323897909850357899558356952867916286821886696195104543796545181129 ``` -------------------------------- ### Scalar Field Root of Unity - Hexadecimal Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the hexadecimal representation of the root of unity for the Scalar Field used in SNARKVM. It offers a compact and machine-readable format. ```Plain Text 00b4b1d4c7e5e163b1af246173fdb411bdb82ac32901dcb9d289433ff2b7d5c9 ``` -------------------------------- ### Base Field Root of Unity U64 Little-Endian Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the U64 (unsigned 64-bit integer) little-endian array representation of the root of unity for the base field. This array structure is designed for optimized processing in cryptographic algorithms and field arithmetic. ```Numerical Representation [2022196864061697551, 17419102863309525423, 8564289679875062096, 17152078065055548215, 17966377291017729567, 68610905582439508] ``` -------------------------------- ### Base Field Modulus - Integer Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the integer representation of the modulus for the Base Field used in SNARKVM. This value defines the prime order of the field. ```Plain Text 8444461749428370424248824938781546531375899335154063827935233455917409239041 ``` -------------------------------- ### Base Field Root of Unity Integer Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the integer representation of the root of unity for the base field. Similar to the scalar field, this constant is vital for polynomial arithmetic and FFTs within the SNARKVM system. ```Numerical Representation 146552004846884389553264564610149105174701957497228680529098805315416492923550540437026734404078567406251254115855 ``` -------------------------------- ### Base Field Root of Unity - Hexadecimal Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the hexadecimal representation of the root of unity for the Base Field used in SNARKVM. It's a standard way to represent large numbers in cryptography. ```Plain Text 0d1ba211c5cc349cd7aacc7c597248269a14cda3ec99772b3c3d3ca739381fb2 ``` -------------------------------- ### Base Field Root of Unity Hexadecimal Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the hexadecimal representation of the root of unity for the base field. This format is a standard way to represent large numerical constants in cryptographic contexts. ```Numerical Representation 00f3c1414ef58c54f95564f4cbc1b61fee086c1fe367c33776da78169a7f3950f1bd15c3898dd1af1c104955744e6e0f ``` -------------------------------- ### Scalar Field Root of Unity U64 Little-Endian Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the U64 (unsigned 64-bit integer) little-endian array representation of the root of unity for the scalar field. This array format is optimized for efficient processing in cryptographic algorithms. ```Numerical Representation [4340692304772210610, 11102725085307959083, 15540458298643990566, 944526744080888988] ``` -------------------------------- ### Edwards BLS12 Base Field Root of Unity in Rust Source: https://github.com/provablehq/snarkvm/blob/staging/curves/README.md This snippet provides the root of unity for the base field of the Edwards BLS12 curve, presented in integer, hexadecimal, and U64 little-endian array formats. This constant is essential for field arithmetic operations, especially those involving fast Fourier transforms. ```Rust 5928890464389279575069867463136436689218492512582288454256978381122364252082 ``` ```Rust 0d1ba211c5cc349cd7aacc7c597248269a14cda3ec99772b3c3d3ca739381fb2 ``` ```Rust [4340692304772210610, 11102725085307959083, 15540458298643990566, 944526744080888988] ``` -------------------------------- ### Scalar Field Root of Unity Hexadecimal Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the hexadecimal representation of the root of unity for the scalar field. This compact format is useful for displaying or storing the constant in a concise manner. ```Numerical Representation 0d1ba211c5cc349cd7aacc7c597248269a14cda3ec99772b3c3d3ca739381fb2 ``` -------------------------------- ### Base Field Modulus - Hexadecimal Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the hexadecimal representation of the modulus for the Base Field used in SNARKVM. It's a common format for cryptographic constants. ```Plain Text 12ab655e9a2ca55660b44d1e5c37b00159aa76fed00000010a11800000000001 ``` -------------------------------- ### BLS12-377 Base Field Root of Unity in Rust Source: https://github.com/provablehq/snarkvm/blob/staging/curves/README.md This snippet provides the root of unity for the base field of the BLS12-377 curve, presented in integer, hexadecimal, and U64 little-endian array formats. This constant is essential for field arithmetic operations, especially those involving fast Fourier transforms. ```Rust 146552004846884389553264564610149105174701957497228680529098805315416492923550540437026734404078567406251254115855 ``` ```text ``` -------------------------------- ### Base Field Modulus U64 Little-Endian Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the U64 (unsigned 64-bit integer) little-endian array representation of the modulus for the base field. This format is optimized for performance in cryptographic computations, allowing for efficient arithmetic operations. ```Numerical Representation [9586122913090633729, 1660523435060625408, 2230234197602682880, 1883307231910630287, 14284016967150029115, 121098312706494698] ``` -------------------------------- ### Base Field Modulus Hexadecimal Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the hexadecimal representation of the modulus for the base field used in SNARKVM. This representation offers a compact and common way to express large cryptographic constants. ```Numerical Representation 01ae3a4617c510eac63b05c06ca1493b1a22d9f300f5138f1ef3622fba094800170b5d44300000008508c00000000001 ``` -------------------------------- ### Scalar Field Modulus - U64 Little-Endian Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the U64 little-endian array representation of the modulus for the Scalar Field used in SNARKVM. This format is suitable for systems that process numbers in 64-bit chunks. ```Plain Text [13356249993388743167, 5950279507993463550, 10965441865914903552, 336320092672043349] ``` -------------------------------- ### Scalar Field Modulus - Integer Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the integer representation of the modulus for the Scalar Field used in SNARKVM. This value defines the size of the field. ```Plain Text 2111115437357092606062206234695386632838870926408408195193685246394721360383 ``` -------------------------------- ### Scalar Field Modulus - Hexadecimal Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/01_edwards_bls12.md This snippet provides the hexadecimal representation of the modulus for the Scalar Field used in SNARKVM. This format is often used for compact display or parsing. ```Plain Text 04aad957a68b2955982d1347970dec005293a3afc43c8afeb95aee9ac33fd9ff ``` -------------------------------- ### Edwards BLS12 Scalar Field Root of Unity in Rust Source: https://github.com/provablehq/snarkvm/blob/staging/curves/README.md This snippet provides the root of unity for the scalar field of the Edwards BLS12 curve, presented in integer, hexadecimal, and U64 little-endian array formats. This value is used in various cryptographic algorithms, particularly for efficient polynomial evaluation and FFTs over the field. ```Rust 319259817323897909850357899558356952867916286821886696195104543796545181129 ``` ```Rust 00b4b1d4c7e5e163b1af246173fdb411bdb82ac32901dcb9d289433ff2b7d5c9 ``` ```Rust [15170730761708361161, 13670723686578117817, 12803492266614043665, 50861023252832611] ``` -------------------------------- ### BLS12-377 Scalar Field Root of Unity in Rust Source: https://github.com/provablehq/snarkvm/blob/staging/curves/README.md This snippet provides the root of unity for the scalar field of the BLS12-377 curve, presented in integer, hexadecimal, and U64 little-endian array formats. This value is used in various cryptographic algorithms, particularly for efficient polynomial evaluation and FFTs over the field. ```Rust 5928890464389279575069867463136436689218492512582288454256978381122364252082 ``` ```Rust 0d1ba211c5cc349cd7aacc7c597248269a14cda3ec99772b3c3d3ca739381fb2 ``` ```Rust [4340692304772210610, 11102725085307959083, 15540458298643990566, 944526744080888988] ``` -------------------------------- ### Scalar Field Modulus Integer Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the integer representation of the modulus for the scalar field used in SNARKVM. This value defines the prime order of the field, which is essential for modular arithmetic operations. ```Numerical Representation 8444461749428370424248824938781546531375899335154063827935233455917409239041 ``` -------------------------------- ### Base Field Modulus Integer Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the integer representation of the modulus for the base field used in SNARKVM. This value defines the prime order of the base field, which is distinct from the scalar field and used for different cryptographic operations. ```Numerical Representation 258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177 ``` -------------------------------- ### Scalar Field Modulus U64 Little-Endian Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the U64 (unsigned 64-bit integer) little-endian array representation of the modulus for the scalar field. This format is commonly used for efficient computation in cryptographic libraries, allowing for word-by-word processing. ```Numerical Representation [725501752471715841, 6461107452199829505, 6968279316240510977, 1345280370688173398] ``` -------------------------------- ### Scalar Field Modulus Hexadecimal Representation Source: https://github.com/provablehq/snarkvm/blob/staging/curves/documentation/the_aleo_curves/02_bls12-377.md This snippet provides the hexadecimal representation of the modulus for the scalar field used in SNARKVM. This format is often used in low-level implementations or for compact display of large numbers. ```Numerical Representation 12ab655e9a2ca55660b44d1e5c37b00159aa76fed00000010a11800000000001 ``` -------------------------------- ### Edwards BLS12 Base Field Modulus in Rust Source: https://github.com/provablehq/snarkvm/blob/staging/curves/README.md This snippet provides the modulus for the base field of the Edwards BLS12 curve, presented in integer, hexadecimal, and U64 little-endian array formats. This value defines the prime order of the base field, which is the underlying field over which the elliptic curve points are defined. ```Rust 8444461749428370424248824938781546531375899335154063827935233455917409239041 ``` ```Rust 12ab655e9a2ca55660b44d1e5c37b00159aa76fed00000010a11800000000001 ``` ```Rust [725501752471715841, 6461107452199829505, 6968279316240510977, 1345280370688173398] ``` -------------------------------- ### Defining Large Integer Array for SNARKVM (Rust) Source: https://github.com/provablehq/snarkvm/blob/staging/algorithms/src/snark/varuna/resources/circuit_0/domain/R.txt This snippet defines an array of large unsigned integers. These numbers are critical cryptographic constants, potentially representing field elements, curve parameters, or precomputed values essential for the SNARKVM's zero-knowledge proof system. They serve as immutable data required for various cryptographic computations. ```Rust [1, 3279917132858342911831074864712036382710139745724269329239664300762234227201, 880904806456922042258150504921383618666682042621506879489, 1973030855696769125460623085327505793054673234941098473458474059731617992635, 8444461749428370424248824938781546531375899335154063827935233455917409239040, 5164544616570027512417750074069510148665759589429794498695569155155175011840, 8444461749428370423367920132324624489117748830232680209268551413295902359552, 6471430893731601298788201853454040738321226100212965354476759396185791246406] ``` -------------------------------- ### BLS12-377 Base Field Modulus in Rust Source: https://github.com/provablehq/snarkvm/blob/staging/curves/README.md This snippet provides the modulus for the base field of the BLS12-377 curve, presented in integer, hexadecimal, and U64 little-endian array formats. This value defines the prime order of the base field, which is the underlying field over which the elliptic curve points are defined. ```Rust 258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177 ``` ```Rust 01ae3a4617c510eac63b05c06ca1493b1a22d9f300f5138f1ef3622fba094800170b5d44300000008508c00000000001 ``` ```Rust [9586122913090633729, 1660523435060625408, 2230234197602682880, 1883307231910630287, 14284016967150029115, 121098312706494698] ``` -------------------------------- ### Edwards BLS12 Scalar Field Modulus in Rust Source: https://github.com/provablehq/snarkvm/blob/staging/curves/README.md This snippet provides the modulus for the scalar field of the Edwards BLS12 curve, presented in integer, hexadecimal, and U64 little-endian array formats. These values define the prime order of the scalar field, crucial for cryptographic operations on the curve. ```Rust 2111115437357092606062206234695386632838870926408408195193685246394721360383 ``` ```Rust 04aad957a68b2955982d1347970dec005293a3afc43c8afeb95aee9ac33fd9ff ``` ```Rust [13356249993388743167, 5950279507993463550, 10965441865914903552, 336320092672043349] ``` -------------------------------- ### BLS12-377 Scalar Field Modulus in Rust Source: https://github.com/provablehq/snarkvm/blob/staging/curves/README.md This snippet provides the modulus for the scalar field of the BLS12-377 curve, presented in integer, hexadecimal, and U64 little-endian array formats. These values define the prime order of the scalar field, crucial for cryptographic operations on the curve. ```Rust 8444461749428370424248824938781546531375899335154063827935233455917409239041 ``` ```Rust 12ab655e9a2ca55660b44d1e5c37b00159aa76fed00000010a11800000000001 ``` ```Rust [725501752471715841, 6461107452199829505, 6968279316240510977, 1345280370688173398] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.