Skip to content

DavidBuchanan314/scratch-cryptography-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scratch Cryptography Library

Modern cryptography primitives implemented in Scratch, via Boiga

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.

A 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)

Algorithms:

Getting the source:

git clone --recursive https://github.com/DavidBuchanan314/scratch-cryptography-library

Compiling the demo:

python3 -m demo

Note: Requires Python 3.10

This should produce a sb3 file at demo/out/Scratch Cryptography Library: Demo.sb3, which you can load into Scratch.

The generated scratch code is massive (~4000 blocks), and looks something like this, when artfully aranged:

image

About

Modern cryptography primitives implemented in Scratch, via Boiga

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages