Last working copy of CAH-MAC implementation