Statistics for Distributed computing and cryptography with general weak random sources