Key and signature packing