scale iterations to match key length