{"id":13710310,"url":"https://github.com/0xfe/cryptopals","last_synced_at":"2025-04-14T01:43:21.192Z","repository":{"id":137306452,"uuid":"258484347","full_name":"0xfe/cryptopals","owner":"0xfe","description":"Cryptopals Cryptography Challenge Solutions in Go (Sets 1 - 6)","archived":false,"fork":false,"pushed_at":"2020-06-05T13:45:27.000Z","size":375,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-13T00:05:40.169Z","etag":null,"topics":["cryptography","cryptopals","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xfe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-24T10:46:25.000Z","updated_at":"2024-05-13T00:05:40.954Z","dependencies_parsed_at":null,"dependency_job_id":"af225a45-80e2-4c12-ba91-e404863885f4","html_url":"https://github.com/0xfe/cryptopals","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfe%2Fcryptopals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfe%2Fcryptopals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfe%2Fcryptopals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfe%2Fcryptopals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xfe","download_url":"https://codeload.github.com/0xfe/cryptopals/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809044,"owners_count":21164895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","cryptopals","go","golang"],"created_at":"2024-08-02T23:00:54.311Z","updated_at":"2025-04-14T01:43:21.169Z","avatar_url":"https://github.com/0xfe.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"## Cryptopals Crypto Challenge Solutions in Go\n\n*Author*: Mohit Cheppudira \u003cmohit@muthanna.com\u003e 2020\n\nThis repository consists of my documented [Go](https://golang.org) solutions to all 6 sets of the original [Cyptopals Cryptography Challenges](https://cryptopals.com/) (formerly known as the Matsano Crypto Challenges).\n\nThese challenges have been implemented as Go tests to make it easy to explore and debug.\n\n### Livestream\n\nI've been livecoding these challenges on Twitch -- if you want to join in, watch at https://twitch.tv/11111110b.\n\nBe warned: some of these sessions are looooooong!\n\n### The Files\n\n* `setN_test.go` - Solutions to the challenges in set `N`.\n* `aes.go` - My implementations of various AES operation modes (ECB, CBC, CTR), along with some block-size detection and cracking code.\n* `sha1/sha1.go` - A modified implementation of Golang's SHA1 to tap and extract hashing state\n* `md4/md4.go` - A modified implementation of Golang's MD4 to tap and extract hashing state\n* `prng.go` - My implementation of the Mersenne Twister PRNG\n* `rsa.go` - My implementation of RSA (keygen, encrypt, decrypt, sign, verify, pad, unpad). Uses OpenSSL to find large random primes.\n* `dsa.go` - My implementation of DSA (keygen, sign, verify)\n* `pkcs7.go` - Functions implementing PKCS7 padding and unpadding.\n* `english.go` - English plaintext-detection using frequency analysis.\n* `bigmath.go` - Modular arithmetic with big integers (exponention, cube root, ceil/floor division, etc.)\n* `helpers.go` - Various helper functions across the codebase: hamming distance, blocksize detection, padding, etc.\n* `data/*.txt` - Data files as part of each challenge.\n\n### To Run:\n\nNote that some challenges have been disabled because they're very slow (e.g., timing attacks, brute force attacks, bleichenbacher98). You can re-enable them within the test as you need.\n\n#### Run all challenges:\n\n```\ngo test -v\n```\n\n#### Run a specific challenge:\n\n```\n# Run challenge 38\ngo test --run C38\n\n# Run all challenges in set 5\ngo test --run S5\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfe%2Fcryptopals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xfe%2Fcryptopals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfe%2Fcryptopals/lists"}