Optimize OCB set_key and set_nonce