Assume it is made a hash based on AES-256 encryption (perhaps because this is hardware-accelerated, but no standard hash is); and it is used the Merkle–Damgård structure, that is padding of the message into $n$ padded message blocks $M_i$ (appending to the message a 1, a minimal number of 0, and the 64-bit message length in bits), and a compression function per the construction of either
- Davies-Meyer for a 128-bit hash with 256-bit blocks $M_i$, that is
- $H_0$ is set to a 128-bit nothing-up-my-sleeves constant;
- for $i$ from $0$ to $n-1$:
$\text{ }H_{i+1}=\text{AES-256}_{M_i}(H_i)\oplus H_i$ - result is $H_n$;
- Hirose (FSE 2006) for a 256-bit hash with 128-bit blocks $M_i$, that is
- $G_0$ and $H_0$ are set to a 128-bit nothing-up-my-sleeves constants;
- for $i$ from $0$ to $n-1$ (with $C$ a non-zero nothing-up-my-sleeves 128-bit constant) $\text{ }\begin{align*} G_{i+1}&=\text{AES-256}_{H_i||M_i}(G_i)\oplus G_i\\ H_{i+1}&=\text{AES-256}_{H_i||M_i}(G_i\oplus C)\oplus(G_i\oplus C) \end{align*}$
- result is $G_n||H_n$.
Notice that in both of these constructions, the message that the adversary can manipulate is entered in the key input of the cipher, making related-key attacks a concern.
Question: In these contexts, are any known or foreseeable AES-256 related-key weaknesses exploitable or seriously threatening?
If yes, do we have other hash constructs where AES (any size) related-key weaknesses would be less of a concern?
Note: For the 128-bit hash we expect an effort comparable to $2^{64}$ encryptions to exhibit a collision (that can be efficiently distributed, see Parallel Collision Search with Cryptanalytic Applications); and $\min(2^{128},2^{129}/n+2^{65})$ encryptions to exhibit a (second) preimage (by a generic attack on Merkle–Damgård hashes attributed to R. D. Dean in his 1999 thesis (section 5.3.1), better exposed and refined by J. Kelsey and B. Schneier in Second Preimages on n-bit Hash Functions for Much Less than 2n Work).
For the 256-bit hash we expect an effort comparable to at least $2^{128}$ encryptions to exhibit a collision, and much more to exhibit a preimage.