code: def encrypt(self, msg):
          
          iv = self.random_bytes(AES.block_size)
          ctr = Counter.new(AES.block_size * 8, initial_value=self.bin2long(iv))
          cipher = AES.AESCipher(self._cipherkey, AES.MODE_CTR, counter=ctr)
          cipher_text = cipher.encrypt(msg)
          intermediate = iv + cipher_text
          signature = self.sign(intermediate)
          return signature + intermediate
docs: encrypts a message