Loop for creating multiple keys in one run.
Remove math.h dependency.