refactored cryptopals lib to make it more clean.