docs: def decrypt(self, ciphertext):
          """Given ``ciphertext`` returns a ``plaintext`` decrypted using the keys specified in ``__init__``.
  
          Raises ``CiphertextTypeError`` if the input ``ciphertext`` is not a string.
          Raises ``RecoverableDecryptionError`` if the input ``ciphertext`` has a non-negative message length greater than the ciphertext length.
          Raises ``UnrecoverableDecryptionError`` if invalid padding is detected, or the the MAC is invalid.
          """
  
          if not isinstance(ciphertext, str):
              raise CiphertextTypeError("Input ciphertext is not of type string")
  
          plaintext_length = self.getPlaintextLen(ciphertext)
          ciphertext_length = self.getCiphertextLen(ciphertext)
          ciphertext_complete = (len(ciphertext) >= ciphertext_length)
          if ciphertext_complete is False:
              raise RecoverableDecryptionError('Incomplete ciphertext: ('+str(len(ciphertext))+' of '+str(ciphertext_length)+').')
  
          ciphertext = ciphertext[:ciphertext_length]
  
          W1_start = 0
          W1_end = AES.block_size
          W1 = ciphertext[W1_start:W1_end]
  
          W2_start = AES.block_size
          W2_end = AES.block_size + plaintext_length
          W2 = ciphertext[W2_start:W2_end]
  
          T_start = AES.block_size + plaintext_length
          T_end = AES.block_size + plaintext_length + Encrypter._MAC_LENGTH
          T_expected = ciphertext[T_start:T_end]
  
          mac = HMAC.new(self.K2, W1 + W2, SHA512)
          T_actual = mac.digest()[:Encrypter._MAC_LENGTH]
          if T_expected != T_actual:
              raise UnrecoverableDecryptionError('Failed to verify MAC.')
  
          iv2_bytes = '\x02' + self._ecb_enc_K1.decrypt(W1)[1:8]
          counter_val = fte.bit_ops.bytes_to_long(iv2_bytes)
          counter_length_in_bits = AES.block_size * 8
          counter = Counter.new(
              counter_length_in_bits, initial_value=counter_val)
          ctr_enc = AES.new(key=self.K1,
                            mode=AES.MODE_CTR,
                            IV='\x00' * 8 + iv2_bytes,
                            counter=counter)
          plaintext = ctr_enc.decrypt(W2)
  
          return plaintext