I looked into the implementation of SHA2 in Python and it looks like it uses some default key for hashing. Once the key is known and the digest is known, is it possible to get the plain-text back? (pre-image attack without brute-force) http://en.wikipedia.org/wiki/Preimage_attack
My intuition says NO as the block size (input size) is 512 bit and the output size is 256 bit. It means that to be a good hashing function (cryptographically) the function should be many to one function (non-invertible). {This is the exact opposite to the requirement of a block cipher where the function should be invertible (one to one).}
As far as I understood the requirement is to have random many-to-one function!
It’s impossible, even with Brute Force, to recover the plain text for a given hash because there are many texts that map to the same N-bit key (for any value of N). That is, there are different messages that have the same digest value.