Suppose you've got a cryptographic system in which keys, plain texts and encrypted messages all exist in the same set (e.g. the set of arrays of bits).
In a situation like that, you could say that the encryption operation E, which takes a plain text block p and a key block k, forms a magma together with the set of messages and keys. What kind of magma is it?
First, there is ideally not going to be a left-identity element I such that E(I, k) = k, because under certain circumstances you could trick an automated system into revealing the key by feeding it the identity element. You probably don't want a right-identity element either, because you wouldn't want to accidentally use it for the key and leave your plain text unencrypted.
Ideally, you would want inverse elements to exist, because you would want the encrypted message to be dependent on every bit of the plain text and every bit of the key, and you would want the encryption function to be invertible. However, if the message space is infinite (i.e. we're talking about all possible messages and keys of all possible lengths) then there is no guarantee that inverse elements would exist.
If I have that right, then this type of magma is a quasigroup if the inverse elements exist.