Updated the w_new logic to match SHA-512 as specificed in FIPS 180-4.