3 ms·
For most of the algorithms even if the supplied algorithm is a naive approach it's harmless, maybe some people learn from it, and some don't, nobody is harmed s
by tialaramex 2y ago
For most of the algorithms even if the supplied algorithm is a naive approach it's harmless, maybe some people learn from it, and some don't, nobody is harmed so it's net good.
Unfortunately this has cryptographic algorithms, and while they're initially quite simple like XOR, eventually we have what look at a glance like more substantial and useful primitives such as RSA encryption†. The authors doubtless know not to use these, but to a student it all seems to work as supplied, but of course it doesn't.
I think the simplification needed to make RSA explicable in this setting makes it so useless and abstracted from reality that it's net harmful, and I'd recommend against providing any of the cryptographic algorithms for that reason.
† Yes I'm aware that RSA encryption is obsolete. Does this site feel like the right pitch to explain that to students ?
- zelphirkalt 2y agoRSA encryption is still very widely used (for example SSH keys with 4096 bit RSA keys). To call it obsolete would need solid basis of argument, I think. Perhaps you mean that specific implementation or way of implementing it?
- tialaramex 2y ago> RSA encryption is still very widely used (for example SSH keys with 4096 bit RSA keys) That's not RSA encryption. Which is fascinating, and my cough got even worse and I have a fever and my demo worked in the presentation anyway, and so I won't be doing any further productive work today... SSHv2 (You don't use SSHv1, if you're younger you may never have used SSHv1) goes roughly like this 1. SSH client connects to SSH server (TCP stuff happens) they agree that they both speak SSHv2 3. SSH client says it can do certain types of cryptographic operation, the server says what it is willing to do, they should overlap or else no progress can be made. 4. A Diffie Hellman Key Exchange is performed based on the shared information from above, now the Client and the Server know a set of fresh unique keys for this session, all further data is encrypted with a symmetric algorithm using these keys. 5a. Now the client should explain how it intends to authenticate as a specific user. It probably wants to prove it has a private key corresponding to a public key that the server already knows (but it could use old-fashioned Unix passwords if that's enabled). 5a. For pubkey auth, the client says "I can prove I have the private key for this 4096 bit RSA key you know" 6. The server can say either "Fine, I know that RSA key, prove it" or "No good, what else can you do?" 7. Assuming the server said "Fine" the client performs RSA signing not encryption to demonstrate that it does have the private key. The signed message is a witness to the above unique conversation and thus cannot be re-played or re-used for any purpose.
- ofrzeta 2y ago> Yes I'm aware that RSA encryption is obsolete. Maybe you are talking about this? https://ikarus.sg/rsa-is-not-dead/ https://ikarus.sg/rsa-is-not-dead/ "Only the ssh-rsa signature algorithm is deprecated"
- tialaramex 2y agoNo, encryption. SSH doesn't use RSA encryption it only uses the RSA signature scheme. The unfortunate naming of this SHA1 based algorithm is not relevant.