> What kind of cryptography is that?It isn't. That is an example where a physical system that would work[‡] does not when applied to mathematics, given as an example where physical world analogies do not translate to useful mathematical methods. It is used as part of the journey towards understanding remote key exchange and public key cryptography, such lectures usually follow the rough pattern:
1. That two-lock physical method is described, which won't work because there is no mathematical operation that can be applied and removed out of sequence like that which is also both not trivial to break/brute-force and doesn't require a pre-shared value which defeats the objective (if you can arrange to securely share that value then you can use that method to share the original secret).
2. But, what about modulo operations? Goes on to show how rotating through a prime modulus might have the same effect, pushing through to explaining a key exchange scheme like DH (where there are pre-shared parameters, but they do not need to be secret). Both parties end up with the same key without ever transmitting it, and can use that to encode the actual message(s).
3. But, key exchange like that, while effective and sufficiently difficult to crack assuming good parameter choices, relies upon both parties being in current contact or the latency is very high as it takes a few back-and-forths to decide the key that will be used to encode the message. What if I want to send a message to you right now, that you can read as soon as you receive it, without having to wait for you to be online so we can derive a secure key first?
4. Goes on to describe the scheme R, S, & A came up with (as did another group in GCHQ a little earlier, but their work was classified for decades so very few knew about it) using public & private key pairs and clever† application of co-prime numbers and modulo arithmetic, and the birth of public key encryption and signing.
--
[‡] ignoring the round-trip latency, and the need for truly indestructible boxes and locks!
[†] it might not seem so genius now as we've known about it for nearly half a century and other schemes are supplanting it, but it is one of those ideas that are relatively obvious once explained but not at all easy to come up with from scratch