js stuff for crypto