-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Having recently mentored several groups of Year 8 girls in 2 different schools in the CyberFirst Girls Competition, as an extension activity I should like to explain RSA and Diffie Hellman to them in simple terms, with simplified worked examples. For this, I need an app which will perform modulo exponentiation. Since school computers are locked down it needs to run in the browser as CyberChef does, and could conveniently be implemented as a CyberChef recipe.
The operation should take a base, an exponent and a modulus and calculate Base ^ Exponent mod Modulus. One of the three should be the Input field, the other two recipe parameters, or all 3 as parameters - not sure which would be most useful.
An optional primality test on those input parameters for which it may be relevant would be nice.
As alternatives, ChatGPT has successfully created modulo exponentiation apps in Python (students with only locked down chromebooks might need to use an online Python service - less convenient) and Javascript (does the biz, but would be nice as a Cyberchef operation as they're already familiar with Cyberchef).
Additional context Those capable of implementing this and with a more complete understanding of RSA and DH will probably be better able than myself to define the finer details.
PS I've just vibe-coded this little tool: https://blueskylark.org/CyberFirst/modexp.html
and ChatGPT reckons that between us we could implement this quite easily. So once the turkey and Christmas pudding-induced somnolence has worn off I'll probably have ago.