Can this method of encryption prevent bruteforce attacks?
If I had a hypothetical table (or function) where every grammatically valid sentence (limited to some number of words) was given an associated number, e.g:
"Good morning, how are you." = 3283
"Today is a nice day." = 2183
Then added a number (as a key), e.g:
3283 + 1234 = 4516
Wouldn't this final output of 4516
be effectively protected against bruteforce attacks?
Ignoring the difficulty of producing a hashtable/function capable of reducing every valid input into a single number, and the issue of sending the key 1234
securely.
Is there any way of finding the original input only from the output?
Is limiting the domain of the encryption to only valid inputs, an effective method of preventing bruteforce attacks?
If so is there any practical example of this? Why or why not?