Skip to content

Public repository for excersices, challenges and all the needs of the Sparkling Water Bootcamp

License

Notifications You must be signed in to change notification settings

lambdaclass/sparkling_water_bootcamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lambda's Sparkling Water Bootcamp - Repo for challenges and learning path

Public repository for exercises, challenges and all the needs of the Sparkling Water Bootcamp.

Week 1 - Forging your tools: Finite Fields

This first week will be focused on the development of one of the building blocks of Cryptography: Finite Fields.

Recommended material:

Challenges:

Cryptography content:

Exercises

  • Implement naïve version of RSA.
  • $7$ is a generator of the multiplicative group of $Z_p^\star$, where $p = 2^{64} - 2^{32} +1$. Find the generators for the $2^{32}$ roots of unity. Find generators for subgroups of order $2^{16} + 1$ and $257$.
  • Define in your own words what is a group, a subgroup, a ring and a field.
  • What are the applications of the Chinese Remainder Theorem in Cryptography?
  • Find all the subgroups of the multiplicative group of $Z_{29}^\star$

Supplementary Material

Week 2 - Enter Elliptic Curves

During the second week we'll continue with Finite Fields and begin with Elliptic Curves and dive deeper into Rust

Recommended material

Exercises

  • Define an elliptic curve element type.
  • Implement the basic operations: addition and doubling.
  • Implement scalar multiplication.
  • Check that the point belongs to the correct subgroup.
  • The BLS12-381 elliptic curve is given by the equation $y^2 = x^3 + 4$ and defined over $\mathbb{F}_p$ with p = 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab. The group generator is given by the point p1 = (0x04, 0x0a989badd40d6212b33cffc3f3763e9bc760f988c9926b26da9dd85e928483446346b8ed00e1de5d5ea93e354abe706c) and the cofactor is $h_1 = 0x396c8c005555e1568c00aaab0000aaab$. Find the generator $g$ of the subgroup of order r = 0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001.
  • Implement a naïve version of the Diffie - Hellman protocol
  • Implement point compression and decompression to store elliptic curve points

Challenges

  • Special CTF challenge (will be revealed later)
  • Implement BN254
  • Implement Secp256k1
  • Implement Ed25519

Rust Workshop

Week 3: Polynomials

Recommended material

Supplementary

Exercises

  • Define a polynomial type.
  • Implement basic operations, such as addition, multiplication and evaluation.
  • Implement Lagrange polynomial interpolation.
  • Implement basic version of Shamir's secret sharing.

Issue

Week 4: STARKs

Recommended material

Exercises

  • Complete STARK-101

Week 5: Symmetric encryption

Recommended material

Supplementary material

Exercises

  • Implement AES round function

Side project - Multilinear polynomials

Mandatory task

  • Choose a project: STARKs, Sumcheck protocol or Groth16 (or propose a new project)

Additional resources for each project

Challenges

  • Implement a multilinear polynomial type with all the basic operations.

Week 6: Interactive proofs and SNARKs

Additional material on some proof systems

Week 7: Plonk

Week 8: Lookup arguments

Week 9: Signatures

Week 10: Folding schemes

Projects

  • Implement IPA commitment scheme
  • Implement Jacobian coordinates for Elliptic Curves
  • Benchmark elliptic curve operations
  • Add improvements to fixed base scalar multiplication in Elliptic Curves
  • Add BN254 elliptic curve
  • Implement Pasta curves
  • Implement Lookup arguments for Plonk (Plookup)
  • Sumcheck protocol
  • Benchmark and optimize multilinear polynomial operations
  • Import circuits from gnark or circom to use with Groth16 backend

Links to repos with solutions to the exercises

Intended Roadmap

  • Finite Fields
  • Elliptic Curves
  • Polynomials
  • Extension fields
  • Pairings
  • Public key encryption
  • Symmetric encryption
  • Hash functions
  • Signatures
  • Authenticated encryption
  • SNARKs
  • STARKs

About

Public repository for excersices, challenges and all the needs of the Sparkling Water Bootcamp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published