it would appear to be legal.

This is why encryption matters.