generified challenge/response system, adding crypto-random, and make some other random tweaks here and there