def METHOD_NAME(self, headers, bit_size, tag):
    if tag is None:
        cctag = b''
    else:
        cctag = u32be_len_input(tag)
    # AlgorithmID
    if self.key_size is None:
        alg_id = u32be_len_input(headers['enc'])
    else:
        alg_id = u32be_len_input(headers['alg'])
    # PartyUInfo
    apu_info = u32be_len_input(headers.get('apu'), True)
    # PartyVInfo
    apv_info = u32be_len_input(headers.get('apv'), True)
    # SuppPubInfo
    pub_info = struct.pack('>I', bit_size) + cctag
    return alg_id + apu_info + apv_info + pub_info