(self, headers, bit_size, tag)
| 48 | return shared_key_e + shared_key_s |
| 49 | |
| 50 | def compute_fixed_info(self, headers, bit_size, tag): |
| 51 | if tag is None: |
| 52 | cctag = b"" |
| 53 | else: |
| 54 | cctag = u32be_len_input(tag) |
| 55 | |
| 56 | # AlgorithmID |
| 57 | if self.key_size is None: |
| 58 | alg_id = u32be_len_input(headers["enc"]) |
| 59 | else: |
| 60 | alg_id = u32be_len_input(headers["alg"]) |
| 61 | |
| 62 | # PartyUInfo |
| 63 | apu_info = u32be_len_input(headers.get("apu"), True) |
| 64 | |
| 65 | # PartyVInfo |
| 66 | apv_info = u32be_len_input(headers.get("apv"), True) |
| 67 | |
| 68 | # SuppPubInfo |
| 69 | pub_info = struct.pack(">I", bit_size) + cctag |
| 70 | |
| 71 | return alg_id + apu_info + apv_info + pub_info |
| 72 | |
| 73 | def compute_derived_key(self, shared_key, fixed_info, bit_size): |
| 74 | ckdf = ConcatKDFHash( |
no test coverage detected