{"id":17041672,"url":"https://github.com/xlab/chunked","last_synced_at":"2026-07-04T08:32:00.021Z","repository":{"id":147149177,"uuid":"171740772","full_name":"xlab/chunked","owner":"xlab","description":"A PoC service for chunked and encrypted file uploads.","archived":false,"fork":false,"pushed_at":"2019-02-20T20:16:18.000Z","size":50,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-29T07:47:59.457Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/xlab.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":"2019-02-20T20:04:25.000Z","updated_at":"2019-03-20T06:29:20.000Z","dependencies_parsed_at":"2023-06-28T19:15:07.808Z","dependency_job_id":null,"html_url":"https://github.com/xlab/chunked","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xlab/chunked","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Fchunked","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Fchunked/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Fchunked/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Fchunked/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xlab","download_url":"https://codeload.github.com/xlab/chunked/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Fchunked/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35115741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-14T09:13:10.402Z","updated_at":"2026-07-04T08:32:00.006Z","avatar_url":"https://github.com/xlab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## chunked\n\nThis is a PoC of a chunked upload manager. The chunking algorithm uses JS on the frontend side to split large files in chunks, each chunk is then encoded using AES-CBC-256 with provided private key (or randomly generated) and uploaded to the server. The server doesn't know the key to decode, so in order to guarantee the integrity of data we use Encrypt-then-MAC with AES-CMAC as the integrity verification algorithm. We use two different keys: keyAESMAC is a 128-bit AES key that is shared with server, but keyAESCBC is a 256-bit AES key and is used only to encrypt data on the frontend.\n\n### Installation\n\n```\n$ mkdir -p $GOPATH/github.com/xlab/chunked\n$ cd $GOPATH/github.com/xlab/chunked\n$ git clone git@github.com:xlab/chunked.git .\n$ go build\n```\n\n### Usage\n\n```\n$ ./chunked -h\n\nUsage: chunked [OPTIONS] COMMAND [arg...]\n\nA service for chunked and encrypted file uploads.\n\nOptions:\n  -d, --uploads-dir   Specify chunk uploads directory. (default \"uploads/\")\n  -l, --listen-addr   Specify server listen address. (default \"127.0.0.1:2019\")\n  -w, --web-assets    Sepcify the web assets path to serve. (default \"assets/\")\n  -k, --cmac-key      An AES-128 key for CMAC-CBC, generated using gen-keys command. (default \"d2d2e0e43a87abd12baba39df25edc3f\")\n\nCommands:\n  gen-keys            Generates AES keys for use in data encoding and integity checks.\n\nRun 'chunked COMMAND --help' for more information on a command.\n```\n\n### Example\n\n```\n$ ./chunked gen-keys\n\nAES-128 for CMAC-CBC: 389d69688f50776b9ab943eaa056ab47\nAES-256 for AES-CBC: 99b253e281d069f059105bb1a97d4936d5b530464778fed8c03dc62a1c41c65a\n\n$ ./chunked -k 389d69688f50776b9ab943eaa056ab47\n\nShared CMAC-CBC AES Key: 389d69688f50776b9ab943eaa056ab47\nOpen your browser at http://127.0.0.1:2019\n```\n\nThen use Web UI to upload the file, also check the JavaScript console for debug messages. The algorithm on the frontend is not effective for production IMO, it's totally synchronous.\n\n#### Step 1\n\n\u003cimg src=\"https://cl.ly/8d43fd6be77c/download/Screenshot%202019-02-21%20at%2003.11.56.png\" width=\"700px\" /\u003e\n\n#### Step 2\n\n\u003cimg src=\"https://cl.ly/3ea3ba9a94ae/download/Screenshot%202019-02-21%20at%2003.11.49.png\" width=\"700px\" /\u003e\n\n#### Step 3\n\n\u003cimg src=\"https://cl.ly/8ea62d3363aa/download/Screenshot%202019-02-21%20at%2003.13.26.png\" width=\"700px\" /\u003e\n\n#### Step 4\n\n\u003cimg src=\"https://cl.ly/b2587f56ff26/download/Screenshot%202019-02-21%20at%2003.14.40.png\" width=\"700px\" /\u003e\n\n### License\n\nNot for sharing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlab%2Fchunked","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxlab%2Fchunked","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlab%2Fchunked/lists"}