code: def decrypt_sk(self, pk):
          if self.pkalg == PubKeyAlgorithm.RSAEncryptOrSign:
              # pad up ct with null bytes if necessary
              ct = self.ct.me_mod_n.to_mpibytes()[2:]
              ct = b'\x00' * ((pk.keymaterial.__privkey__().key_size // 8) - len(ct)) + ct
  
              decrypter = pk.keymaterial.__privkey__().decrypt
              decargs = (ct, padding.PKCS1v15(),)
  
          elif self.pkalg == PubKeyAlgorithm.ECDH:
              decrypter = pk
              decargs = ()
  
          else:
              raise NotImplementedError(self.pkalg)
  
          m = bytearray(self.ct.decrypt(decrypter, *decargs))
  
          
  
          symalg = SymmetricKeyAlgorithm(m[0])
          del m[0]
  
          symkey = m[:symalg.key_size // 8]
          del m[:symalg.key_size // 8]
  
          checksum = self.bytes_to_int(m[:2])
          del m[:2]
  
          if not sum(symkey) % 65536 == checksum:  # pragma: no cover
              raise PGPDecryptionError("{:s} decryption failed".format(self.pkalg.name))
  
          return (symalg, symkey)
docs: The value "m" in the above formulas is derived from the session key
          as follows.  First, the session key is prefixed with a one-octet
          algorithm identifier that specifies the symmetric encryption
          algorithm used to encrypt the following Symmetrically Encrypted Data
          Packet.  Then a two-octet checksum is appended, which is equal to the
          sum of the preceding session key octets, not including the algorithm
          identifier, modulo 65536.  This value is then encoded as described in
          PKCS#1 block encoding EME-PKCS1-v1_5 in Section 7.2.1 of [RFC3447] to
          form the "m" value used in the formulas above.  See Section 13.1 of
          this document for notes on OpenPGP's use of PKCS#1.