Encryption that purposefully take hours to decrypt My problem:


I want to block sites on my router.
I want to generate new password for my router after blocking sites.
This new password I want to encrypt.
But to decrypt it, I want it to take 2 to 8 hour to decrypt.


Is there any solution that could solve my problem? 

The reason to do that is I want to lock myself out. By generating a random password that I can't memorize and doing the encryption, I can be sure that it's impossible for me to login. As Joseph Sible-Reinstate Monica commented:


  I think the actual goal here is that the OP is trying to focus on something important for a while, and so block access to distracting sites, and needs to lock themselves out so they don't just unblock them when they want to look at them.


Related: How to hide a code from myself until a specified time?
on Super User.
Time-lock puzzles appear to be what you want (see for example this).
A basic construction is via "Repeated Squaring in the RSA group".

Let $p,q$ be large primes, and let $N = pq$.
The goal is, for fixed $t&gt;0$, to compute $2^{2^t}\bmod N$.
There are two "obvious" ways to do this, depending on whether you know the factorization of $N$ or don't.

If you do know the factorization of $N$, you can first compute $2^t\bmod \varphi(N) = 2^t\bmod (p-1)(q-1)$, and then compute $2^{2^t\bmod \varphi(N)}$ via Repeated Squaring. The complexity of this is at most $O(\log N)$ multiplications within $(\mathbb{Z}/N\mathbb{Z})$.

If you don't know the factorization of $N$, then there are some conjectures [1] that computing $2^{2^t}\bmod N$ must be done "directly" (and that it cannot really be parallelized).
One can do this by repeated squaring to give a complexity of $2t$ multiplications within $(\mathbb{Z}/N\mathbb{Z})$.
Here $t\in\mathbb{N}$ is an arbitrarily large number, allowing you to make this as "difficult" as you want.

Note that someone could always factor $N$ if they want to ignore this (so it's not "arbitrarily hard"), but if you make factoring $N$ appropriately hard it gives you fine-grained control over the difficulty of computing $2^{2^t}\bmod N$ (which is the "easier option" in comparison).
One can then use $2^{2^t}\bmod N$ as the basis of any symmetric-key crypto scheme (or hash it into any suitable domain first).
Your algorithm could then look as follows:


To encrypt something, generate an RSA instance, compute $2^{2^t}\bmod N$, use this value (or its hash) to encrypt something, then only store $(N, t)$.
To decrypt, start by recomputing $2^{2^t}\bmod N$, then decrypt using whatever "base scheme" you encrypted with.


This has the benefit of allowing you freedom to "tune" the parameter $t$ to take however long you want to decrypt.



[1] For more information I'd suggest looking into Verifiable Delay Functions, but I'm not too familiar with the area admittedly.