Can you help me understand hash-preserving encryption? I have rather simplistic understanding of cryptography, so I have to beg a pardon in advance if the question has internal contradictions.

Imagine data $A$ with a hash $hashA$. This data is encrypted with private key $K$ to get data $E$ and the hash of the encrypted data is $hashE$.


Are there encryption method and hashing method, which will allow to verify, given $hashA$, $hashE$ and $K$, that $hashE$ is indeed a hash of “A encrypted with K”?
How secure could that algorithm be against attempted forgeries, i.e. someone having access to $A$ creating $E$ and $K$, so that $hashA$, $hashE$ and $K$ are correct in sense of $1$, but $E$ is not “A encrypted with K”?


Clearly the identity hash $(hash(x)=x)$ works, but I'm more interested in hashes which are significantly smaller than the original data.
A generic construction could be something like this:

$\def\Enc{\operatorname{Enc}}$ Take a simple hash function $H$ and encryption function $\Enc_K$.

Then define $E = (\Enc_K(H(A)), \Enc_K(A))$ as the encryption, $hashA(A) = H(A)$ and $hashE(x,y) = x$.

Then we have $hashE(E) = \Enc_K(H(A))$, which of course is easy to check against $H(A)$, given $K$.

Of course, this in no way satisfies your unforgability requirement: Only someone with access to both $E$ and $K$ can check if the hash part of $E$ matches the rest of it.