This is going to be a lot like sz_rotary from sztest, and one of the more complex things to implement.