Like Darkes said, there are many other algorithms one could use for which this process would be ineffective. Symmetric ciphers like AES and Blowfish are immune to this type of cryptanalysis: for them, you have virtually no other option than to try every possible key. As algorithms like this can be created with extremely large keys, it is extremely difficult to do so.
Anyone could get 1024-bit symmetric encryption for free if he or she knew where to look. In this case, it would be far more secure than asymmetric encryption.