Coder Social home page Coder Social logo

cryptopals's Introduction

The сryptopals challenges solutions

These are my solutions to the infamous cryptopals challenges.

How to use this code

The solutions to the challenges are designed as tests and could be found in the files with names in the form [set#]_[challenge#]_[short_description]_test.go.

This project was not meant to be be required. To run the solutions simply clone this repository to a local directory and run from its root:

go test -v cryptopals/cryptopals

This should run all the tests (i.e. challenges solutions) at once but you probably don't want to do. To run the solution to a specific challenge look for its test name in the corresponding {{*_test.go}} file and run it with:

go test -v cryptopals/cryptopals -run TestPkcs15PaddingOracleAttack

Notes

In the description to the challenges you can find this suggestion:

Our friend Maciej says these challenges are a good way to learn a new language, so maybe now's the time to pick up Clojure or Rust.

I had wanted to check out Go for some time so I skipped through the tour of Go, glanced through the stdlib to make sure I wouldn't have to implement something like big number arithmetic myself and set to work. So while the code for every next challenge is hopefully a more idiomatic Go than for the previous one, keep in mind this was the first time I used the language.

I hope the code is readable and I commented the difficult to understand parts but this is not the kind of project you write a highly maintainable code so expect a code quality typical for a "proof of concept".

When going through the challenges I had to pause to read up on the number theory. If you need to brush up the math on the topic too I highly recommend "The Mathematics of Ciphers: Number Theory and RSA Cryptography".

cryptopals's People

Contributors

epsylonix avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.