Adventures in crypto dark matter: attacks, fixes and analysis for weak pseudorandom functions