{"id":18715868,"url":"https://github.com/davidbuchanan314/scratch-cryptography-library","last_synced_at":"2025-04-12T13:13:39.437Z","repository":{"id":104802125,"uuid":"482145465","full_name":"DavidBuchanan314/scratch-cryptography-library","owner":"DavidBuchanan314","description":"Modern cryptography primitives implemented in Scratch, via Boiga","archived":false,"fork":false,"pushed_at":"2022-07-16T22:02:44.000Z","size":47,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T13:13:36.094Z","etag":null,"topics":["blake2s","blake3","boiga","chacha20-poly1305","scratch","scratch3","x25519"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavidBuchanan314.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-04-16T03:31:05.000Z","updated_at":"2025-03-09T14:14:17.000Z","dependencies_parsed_at":"2023-05-30T00:30:19.433Z","dependency_job_id":null,"html_url":"https://github.com/DavidBuchanan314/scratch-cryptography-library","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/DavidBuchanan314%2Fscratch-cryptography-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Fscratch-cryptography-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Fscratch-cryptography-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Fscratch-cryptography-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidBuchanan314","download_url":"https://codeload.github.com/DavidBuchanan314/scratch-cryptography-library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571862,"owners_count":21126522,"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":["blake2s","blake3","boiga","chacha20-poly1305","scratch","scratch3","x25519"],"created_at":"2024-11-07T13:10:35.155Z","updated_at":"2025-04-12T13:13:39.432Z","avatar_url":"https://github.com/DavidBuchanan314.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scratch Cryptography Library\nModern cryptography primitives implemented in Scratch, via [Boiga](https://github.com/DavidBuchanan314/boiga)\n\n**IMPORTANT NOTE:** This is a toy. Don't trust these implementations. Although I have implemented constant-time algorithms, there are no guarantees that they're constant time in the Scratch runtime. Furthermore, I think there are some edge-cases in modular multiplication in poly1305 and x25519 that I need to address, which may be security-relevant.\n\nA demo project is here: https://scratch.mit.edu/projects/714773326/ (It doesn't do anything useful yet, but you can see what the compiled code looks like)\n\n## Algorithms:\n\n- BLAKE3 (https://github.com/BLAKE3-team/BLAKE3-specs)\n- BLAKE2s ([RFC-7693](https://datatracker.ietf.org/doc/html/rfc7693))\n- ChaCha20 ([RFC-8439](https://datatracker.ietf.org/doc/html/rfc8439))\n- ChaCha20-based CSPRNG\n- ChaCha20-Poly1305 ([RFC-8439](https://datatracker.ietf.org/doc/html/rfc8439))\n- x25519 ([RFC-7748](https://datatracker.ietf.org/doc/html/rfc7748)) (EC scalar multiplication, suitable for ECDH)\n\n### Getting the source:\n\n```\ngit clone --recursive https://github.com/DavidBuchanan314/scratch-cryptography-library\n```\n\n### Compiling the demo:\n```\npython3 -m demo\n```\n\nNote: Requires Python 3.10\n\nThis should produce a sb3 file at `demo/out/Scratch Cryptography Library: Demo.sb3`,\nwhich you can load into Scratch.\n\nThe generated scratch code is massive (~4000 blocks), and looks something like this, when artfully aranged:\n\n![image](https://user-images.githubusercontent.com/13520633/174197302-59255d92-577d-4316-a0ff-1f7f32021ba3.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbuchanan314%2Fscratch-cryptography-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidbuchanan314%2Fscratch-cryptography-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbuchanan314%2Fscratch-cryptography-library/lists"}