lib/crypto: add and build a copied version of SHA512 functions.