You don't do it in a reversable way.
Pass the user id in clear and a key of some kind (hashed) to the box. The box then has the same shared key and can perform the hash on its side, comparing the received value versus the calculated one.
RSA even 128 bit for your purposes should be enough. You can generate new keys using pseudo-random generators or you can use PKI for your needs.