Re-implementation of CAH-MAC