Skip to content

IU math grad students learning coding and cryptography

Notifications You must be signed in to change notification settings

nkohen/IUGradMathCrashCourse

Repository files navigation

IU Math Grad Student Coding & Crypto Crash Course

Using this repository, we will be learning the basics of software engineering and cryptography for the sake of learning new skills, building resumes, and for some, preparing to apply for summer internships in industry.

This crash course will take place asyncronously over the Spring semester online, mostly here in this repository. There is also an accompanying slack channel for questions and discussions.

Goals

  • Learn to code in at least two languages
  • Learn to Software Engineer
    • Collaborative, industry-like FOSS project workflow
  • Learn enough Cryptography to be dangerous
  • Implement MuSig2
  • Document everything

Generally speaking these goals will be reached by asynchronously proceeding in the following stages:Stages

Getting Started

The first two concurrent stages of this course (as seen above) are to learn basic coding and to learn basic Elliptic Curve Cryptography (ECC). Make sure to write down notes of the important things you've learned as we will be collectively generating documents/resources to make this course easier for future years, as well as for our own use. This includes notes about individual programming languages, software engineering in general, and cryptographic concepts. Please also take notes about feedback for how this course may be run more effectively in the future, including changes that should be made to this or other teaching documents, which should be proposed as an issue or a pull request (more on what these are below).

Starting to Code (to be done concurrently with learning ECC)

We will learn basic coding through a series of exercises that I have collected. These exercises begin with simple tasks whose primary purpose is to get you familiar with the basic structure and syntax of programs in a few different programming languages. You can decide for yourself which problems seem interesting and even propose your own exercises.

In the beginning it will suffice to attempt solutions to these exercises within online code editors (make sure to save your code on your computer though), and you can get started right away without any installation! But it will quickly become benificial to install an Integrated Development Environment (IDE) and write code locally on your own computer. Solutions will then be posted here, on this GitHub repository, as pull requests which your peers and I (and some other developers on occasion) will review and give feedback (for correctness as well as clarity and style/design). Note that you are allowed and encouraged to seek help on all of these exercises both from other people and the internet. If you have not yet installed git on your computer, you can submit solutions directly to me and I will push them onto this repository for review for you.

You are also encouraged (when it makes sense) to look at, and even improve upon, other's solutions and see how fast and/or how simply/clearly you can solve each problem you attempt. One of the goals here is to learn multiple programming languages so, for example, if you are attempting a problem with the intention primarily of getting the hang of a new language, it is completly alright to simply transpose a solution from another language.

As you are becoming more comfortable with writing code in multiple programming languages, I will also begin to assign tutorials on using Git and GitHub, as well as other things such as more interesting kinds of tests that we can write.

Learning ECC (to be done concurrently with starting to code)

I have compiled a succinct list of relatively easy readings introducing the relevant ideas in cryptography, and in particular Elliptic Curve Schnorr digital signatures. I expect that these readings alone, along with some accompanying exercises, will be sufficient to learn enough cryptography to acheive our goals, though further exploration is of course allowed/encouraged.

I recommend you begin with the Discrete Log Problem and then the Elliptic Curve excerpts, and then move on to my blog posts about Schnorr signatures and then the MuSig protocol. Finally, you will be ready to read the actual MuSig Paper followed by the MuSig2 Paper which improves upon it, though I do not expect or encourage any of you to read the actual proofs in these papers, only the actual constructions (which constitute only the first few pages of each paper). If you are interested in the details of why MuSig2 needs to avoid hash-sum collisions, I will also encourage you to read Wagner Generalized Birthday Problem Paper, which is also a fun read for its own sake.

None of these readings should be prohibitively hard, if something is it is probably not something you need to be reading (e.g. we won't be reading all of the MuSig or MuSig2 papers, only the construction parts), if you're unsure then ask!

This reading list should suffice for our purposes, but I have also included some extra readings below if you are interested in learning more, and there is much more out there and you should feel free to ask me for further resources if you have any specific (or vague) interests you would like to pursue.

Git and GitHub

To begin using GitHub, I recommend you begin with this set up Git tutorial to help with installation and configuration, and then this fork a repo tutorial where you should attempt to fork this repository instead of the one provided; this will allow you to make changes on your fork and propose them as pull requests to this repository (also see below for corrections to some tutorials).

Once you have done that basic installation and configuration, I recommend following this tutorial which will walk you through the most common commands and workflow of using Git.

Next Steps

Once enough people have reached the point that they feel comfortable with basic coding, using GitHub collaboratively, and ECC (circa late Febuary - early March), we will open some design discussions on this repository and begin our first project of implementing MuSig! We will implement this protocol in multiple languages and generate documentation about this protocol. After we iterate a few times to turn our working (and tested) implementations into final products, we will then implement the MuSig2 protocol by building off of our first project. More to come after this if there is time.

Resource Table of Contents

Cryptography Resources

Online Editors

Tutorials

  • Linux Terminal
  • Getting Started with Git and GitHub
    • If creating a new repository (not forking this one) then to the start of step 6 where one uses "git checkout master" also run "git branch -M main" before proceeding (this changes our branch to "main" instead of "master")
    • Edit a file in your branch before pushing in step 7 (as it stands the tutorial does not show what happens when a change is actually made)
    • If you forked a different repository, for step 10, instead of using "git pull origin master" run "git pull origin main" (since earlier we changed our branch to "main")
  • Git
  • GitHub Gists
  • Go
  • C#
  • Scala
  • Haskell
  • Julia

Cheat Sheets

Installation

Style Guides

Linters

About

IU math grad students learning coding and cryptography

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages