# Encryption algorithms that require more work to decrypt versus encrypt?

Are there any encryption algorithms that require significantly more work to decrypt, versus the amount of work required to encrypt?

I'm looking for a method of fast encryption, but which will require much more CPU time to decrypt later, as a method of spam prevention (prevent people from decrypting too many files in a short amount of time).

One thing I should mention, is that the encryption key itself will be public knowledge.
I'm not trying to lock anyone out, I just want to force them to work before they can acquire data.

• Symmetric or asymmetric? Jan 12 at 8:16
• @forest Preferably symmetric, but I'm open to any ideas right now. (Early design stages.)
– poly
Jan 12 at 8:17
• This looks like an X/Y problem. What is the thing you're trying to do? Jan 12 at 8:19
• It looks like you should be looking for access control and rate control instead of increasing the work factor (which is almost sure to not work as well as you expect). Jan 12 at 9:23
• Bitcoin should have taught you that proof of work is a bad idea: motivated people will have enough work power, while normal users will be negatively impacted. It will most likely not solve your problem and just make your system use so much power that nobody in their right mind would want to use it. Jan 12 at 9:29

Since the encryption key is public knowledge, one simple method is to encrypt using a standard symmetric algorithm (such as AES), but randomize a portion of the encryption key.

For example, if you use AES-256, and the encryption key is published, but each individual encrypted file has 12 bits of the key overwritten with a random value (which is never saved or stored anywhere), so decrypting the file will require the decrypting device to brute-force the final 12 bits of the key.

The number of bits randomized, can be adjusted based on how quickly people are able to crack it, to hit whatever sweet-spot of required work you are looking for.

IMPORTANT:
It should be noted, as A. Hersean pointed out in the comments, that this method may have significant negative side effects:

... proof-of-work is a bad idea: motivated people will have enough work power, while normal users will be negatively impacted. It will most likely not solve your problem and just make your system use so much power that nobody would want to use it.

• Are you playing a game with your users? What the hell a normal user will want to this. Jan 12 at 9:19
• @kelalaka lol it's just a proof-of-work spam prevention methodology. If I design it well, the benefits will greatly outweigh the end-user costs.
– poly
Jan 12 at 9:21
• After users find out passwords for particular files, they would post passwords on some external web resource, so that the others benefit from it. Thus you will not slow your users down. Jan 12 at 17:23
• @mentallurg they would post passwords on some external web resource, so that the others benefit from it This would require universal cooperation from every single global user, and would provide no benefit with less than ~95% of users actively participating in the "password posting." (Even with 100% participation, the "benefit" is pretty minor.) As I mentioned in the main question comments, this work requirement is clearly not a complete solution, but just one layer of defense. Without additional safeguards alongside it, this probably won't provide the level of protection I'm looking for.
– poly
Jan 12 at 17:48