{"id":25878431,"url":"https://github.com/fionn/cryptopals","last_synced_at":"2025-03-02T12:30:42.654Z","repository":{"id":50392376,"uuid":"41709281","full_name":"fionn/cryptopals","owner":"fionn","description":"Attack at dawn","archived":false,"fork":false,"pushed_at":"2024-06-05T16:56:35.000Z","size":313,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T20:12:29.394Z","etag":null,"topics":["cryptanalysis","cryptography","cryptopals","cryptopals-crypto-challenges","matasano","matasano-crypto-challenges"],"latest_commit_sha":null,"homepage":"https://cryptopals.com/","language":"Python","has_issues":false,"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/fionn.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":"2015-09-01T01:13:45.000Z","updated_at":"2024-06-05T16:56:39.000Z","dependencies_parsed_at":"2024-06-05T18:52:14.901Z","dependency_job_id":null,"html_url":"https://github.com/fionn/cryptopals","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fionn%2Fcryptopals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fionn%2Fcryptopals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fionn%2Fcryptopals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fionn%2Fcryptopals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fionn","download_url":"https://codeload.github.com/fionn/cryptopals/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241507364,"owners_count":19973813,"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":["cryptanalysis","cryptography","cryptopals","cryptopals-crypto-challenges","matasano","matasano-crypto-challenges"],"created_at":"2025-03-02T12:30:42.159Z","updated_at":"2025-03-02T12:30:42.645Z","avatar_url":"https://github.com/fionn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cryptopals\n==========\n\n\u003e *Let us speak no more of faith in man, but bind him down from mischief by the chains of cryptography.*\n\nMy solutions to the [~~Matasano~~ Cryptopals Crypto Challenges](https://cryptopals.com/) in Python 3.\n\nTest with `make test` and generate a test coverage report with `make coverage`.\n\nSet 1: Basics\n-------------\n\n1. [x] [Convert hex to base64](m01.py)\n2. [x] [Fixed XOR](m02.py)\n3. [x] [Single-byte XOR cipher](m03.py)\n4. [x] [Detect single-character XOR](m04.py)\n5. [x] [Implement repeating-key XOR](m05.py)\n6. [x] [Break repeating-key XOR](m06.py)\n7. [x] [AES in ECB mode](m07.py)\n8. [x] [Detect AES in ECB mode](m08.py)\n\nSet 2: Block crypto\n-------------------\n\n9. [x] [Implement PKCS#7 padding](m09.py)\n10. [x] [Implement CBC mode](m10.py)\n11. [x] [An ECB/CBC detection oracle](m11.py)\n12. [x] [Byte-at-a-time ECB decryption (Simple)](m12.py)\n13. [x] [ECB cut-and-paste](m13.py)\n14. [x] [Byte-at-a-time ECB decryption (Harder)](m14.py)\n15. [x] [PKCS#7 padding validation](m15.py)\n16. [x] [CBC bitflipping attacks](m16.py)\n\nSet 3: Block and stream crypto\n----------------------------\n\n17. [x] [The CBC padding oracle](m17.py)\n18. [x] [Implement CTR, the stream cipher mode](m18.py)\n19. [x] [Break fixed-nonce CTR mode using substitutions](m19.py)\n20. [x] [Break fixed-nonce CTR statistically](m20.py)\n21. [x] [Implement the MT19937 Mersenne Twister RNG](m21.py)\n22. [x] [Crack an MT19937 seed](m22.py)\n23. [x] [Clone an MT19937 RNG from its output](m23.py)\n24. [x] [Create the MT19937 stream cipher and break it](m24.py)\n\nSet 4: Stream crypto and randomness\n-----------------------------------\n\n25. [x] [Break \"random access read/write\" AES CTR](m25.py)\n26. [x] [CTR bitflipping](m26.py)\n27. [x] [Recover the key from CBC with IV = Key](m27.py)\n28. [x] [Implement a SHA-1 keyed MAC](m28.py)\n29. [x] [Break a SHA-1 keyed MAC using length extension](m29.py)\n30. [x] [Break an MD4 keyed MAC using length extension](m30.py)\n31. [x] [Implement and break HMAC-SHA1 with an artificial timing leak](m31.py)\n32. [x] [Break HMAC-SHA1 with a slightly less artificial timing leak](m32.py)\n\nSet 5: Diffie-Hellman and friends\n---------------------------------\n\n33. [x] [Implement Diffie-Hellman](m33.py)\n34. [x] [Implement a MITM key-fixing attack on Diffie-Hellman with parameter injection](m34.py)\n35. [x] [Implement DH with negotiated groups, and break with malicious _g_ parameters](m35.py)\n36. [x] [Implement Secure Remote Password (SRP)](m36.py)\n37. [x] [Break SRP with a zero key](m37.py)\n38. [x] [Offline dictionary attack on simplified SRP](m38.py)\n39. [x] [Implement RSA](m39.py)\n40. [x] [Implement an _e_ = 3 RSA broadcast attack](m40.py)\n\nSet 6: RSA and DSA\n------------------\n\n41. [x] [Implement unpadded message recovery oracle](m41.py)\n42. [x] [Bleichenbacher's _e_ = 3 RSA Attack](m42.py)\n43. [x] [DSA key recovery from nonce](m43.py)\n44. [x] [DSA nonce recovery from repeated nonce](m44.py)\n45. [x] [DSA parameter tampering](m45.py)\n46. [x] [RSA parity oracle](m46.py)\n47. [x] [Bleichenbacher's PKCS 1.5 Padding Oracle (Simple Case)](m47.py)\n48. [x] [Bleichenbacher's PKCS 1.5 Padding Oracle (Complete Case)](m48.py)\n\nSet 7: Hashes\n-------------\n\n49. [x] [CBC-MAC Message Forgery](m49.py)\n50. [x] [Hashing with CBC-MAC](m50.py)\n51. [x] [Compression Ratio Side-Channel Attacks](m51.py)\n52. [x] [Iterated Hash Function Multicollisions](m52.py)\n53. [x] [Kelsey and Schneier's Expandable Messages](m53.py)\n54. [x] [Kelsey and Kohno's Nostradamus Attack](m54.py)\n55. [ ] MD4 Collisions\n56. [ ] RC4 Single-Byte Biases\n\nSet 8: Abstract algebra\n-----------------------\n\n57. [ ] Diffie-Hellman Revisited: Small Subgroup Confinement\n58. [ ] Pollard's Method for Catching Kangaroos\n59. [ ] Elliptic Curve Diffie-Hellman and Invalid-Curve Attacks\n60. [ ] Single-Coordinate Ladders and Insecure Twists\n61. [ ] Duplicate-Signature Key Selection in ECDSA (and RSA)\n62. [ ] Key-Recovery Attacks on ECDSA with Biased Nonces\n63. [ ] Key-Recovery Attacks on GCM with Repeated Nonces\n64. [ ] Key-Recovery Attacks on GCM with a Truncated MAC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffionn%2Fcryptopals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffionn%2Fcryptopals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffionn%2Fcryptopals/lists"}