reorg crypto and add hmac