# What's the name of this cipher? And how can it be broken?

Assuming that:

• SHA-256 and SHA-512 are random and irreversible
• the output appended to some random and long enough secret is just as random as any other data and will produce values that are just as hard to guess

Then one can conclude that a cipher can be constructed using those hash functions in the following manner:

• let state and key both be 32 or 64 byte values
• initialize state with a random IV and key with a random key
• make v equal the hash of state + key, xor block of plaintext withv
• update state with the cipher produced
• repeat until all plaintext is processed
• to decrypt do the same, but update the state with the cipher text

Now the question is, does such a cipher exist? Is it possible to discover the plaintext given a ciphertext without brute-forcing the key? If so, what techniques could be used for that?

• I checked using openssl speed aes, the screenshot: imgur.com/enh3VeC – Douglas Sep 24 '16 at 20:30