ccm encryption fixes