{"id":37135118,"url":"https://github.com/arvindpj007/aes-ctr-padding-attack","last_synced_at":"2026-01-14T15:45:50.165Z","repository":{"id":122852857,"uuid":"251457583","full_name":"arvindpj007/AES-CTR-Padding-Attack","owner":"arvindpj007","description":"Golang programs for AES-CTR mode encryption with 2 different hashing algorithm and Padding Oracle attack on AES-CTR mode.","archived":false,"fork":false,"pushed_at":"2020-04-12T03:12:37.000Z","size":16,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-07T15:03:41.481Z","etag":null,"topics":["aes-128","aes-ctr","aes-decryption","aes-encryption","checksum","crc32","cryptanalysis","ctr-mode","golang-programs","padding-oracle-attacks"],"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/arvindpj007.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-03-31T00:09:04.000Z","updated_at":"2024-06-19T11:12:35.266Z","dependencies_parsed_at":"2024-06-19T11:12:32.674Z","dependency_job_id":null,"html_url":"https://github.com/arvindpj007/AES-CTR-Padding-Attack","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/arvindpj007/AES-CTR-Padding-Attack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvindpj007%2FAES-CTR-Padding-Attack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvindpj007%2FAES-CTR-Padding-Attack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvindpj007%2FAES-CTR-Padding-Attack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvindpj007%2FAES-CTR-Padding-Attack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arvindpj007","download_url":"https://codeload.github.com/arvindpj007/AES-CTR-Padding-Attack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvindpj007%2FAES-CTR-Padding-Attack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aes-128","aes-ctr","aes-decryption","aes-encryption","checksum","crc32","cryptanalysis","ctr-mode","golang-programs","padding-oracle-attacks"],"created_at":"2026-01-14T15:45:49.158Z","updated_at":"2026-01-14T15:45:50.151Z","avatar_url":"https://github.com/arvindpj007.png","language":"Go","readme":"# AES CTR Padding Attack\n\n## Golang programs for Padding Oracle attack on AES-CTR mode that uses checksum\n\n1. `encrypt-auth-chk` contains `main.go` program to perform AES encryption in CTR mode with HMAC. Here the AES function is used from the standard package, but the CTR mode encryption and checksum calculations are performed in program. \n\n    The checksum works as follows: \n\n    On input a message M, first parse M into a sequence of octets M1, . . . , Mn. Then checksum \n    \n    T = sum(M_i mod 256) for i= 1 to n\n    \n    To build the binary, the following command can be performed:\n            \n        go build\n    The encryption/decryption can be performed with the following command:\n\n        ./encrypt \u003cmode\u003e -k \u003c16-byte key in hexadecimal\u003e -i \u003cinput file\u003e -o \u003coutput file\u003e\n    mode = `encrypt` or `decrypt`\n\n2. `decrypt-test-chk` contains `main.go` program that works like the oracle. The program `./decrypt-test-chk` that has the key K hardcoded into it. It performs decryption of the provided cipher text and it will not return the decrypted ciphertext, but instead only a single one of the following three response messages:\n    1. “SUCCESS”\n    3. “INVALID MAC”\n\n    The command-line profile for decrypt-test will be as follows:\n\n        ./decrypt-test-chk -i \u003cciphertext file\u003e\n\n3. `decrypt-attack-chk` contains `main.go` program that performs the padding oracle attack. The program takes a cipher text as the input programmatically decrypts and returns the plain text of any ciphertext produced by your encryption utility from `encrypt-auth-chk` with the help of `./decrypt-test-chk`. It will not have access to a decrypt-key. The command-line profile for decrypt-test will be as follows:\n\n        ./decrypt-attack-chk -i \u003cciphertext file\u003e\n\n## Golang programs for Padding Oracle attack on AES-CTR mode that uses CRC32\n\n1. `encrypt-auth-crc` contains `main.go` program to perform AES encryption in CTR mode with HMAC. Here the AES and CRC32 function is used from the standard package, but the CTR mode encryption calculation is performed in program. \n\n    To build the binary, the following command can be performed:\n            \n        go build\n    The encryption/decryption can be performed with the following command:\n\n        ./encrypt \u003cmode\u003e -k \u003c16-byte key in hexadecimal\u003e -i \u003cinput file\u003e -o \u003coutput file\u003e\n    mode = `encrypt` or `decrypt`\n\n2. `decrypt-test-crc` contains `main.go` program that works like the oracle. The program `./decrypt-test-crc` that has the key K hardcoded into it. It performs decryption of the provided cipher text and it will not return the decrypted ciphertext, but instead only a single one of the following three response messages:\n    1. “SUCCESS”\n    3. “INVALID MAC”\n\n    The command-line profile for decrypt-test will be as follows:\n\n        ./decrypt-test-crc -i \u003cciphertext file\u003e\n\n3. `decrypt-attack-crc` contains `main.go` program that performs the padding oracle attack. The program takes a cipher text as the input programmatically decrypts and returns the plain text of any ciphertext produced by your encryption utility from `encrypt-auth-crc` with the help of `./decrypt-test-crc`. It will not have access to a decrypt-key. The command-line profile for decrypt-test will be as follows:\n\n        ./decrypt-attack-crc -i \u003cciphertext file\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farvindpj007%2Faes-ctr-padding-attack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farvindpj007%2Faes-ctr-padding-attack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farvindpj007%2Faes-ctr-padding-attack/lists"}