# Recryption of ciphertext with a different key

Let's have $P$ some sensitive piece of data and $K_1$a secret value, both known to Alice, but not to Bob. $K_1(P)$ means $P$ encrypted using $K_1$.

Alice sends $K_1(P)$ to Bob. Bob keeps the value of $K_1(P)$.

Later Alice decides to change her keys. She needs to replace $K_1$ with $K_2$. The goal is to do some transformation on Bob's side with $K_1(P)$ resulting into $K_2(P)$ without revealing $K_1$, $K_2$ nor $P$ to Bob.

Alice should tell Bob something like this: "There is a value $X$ (which I somehow computed from $K_1$ and $K_2$) and transformation $T$. Use $T$ with $X$ and $K_1(P)$ in order to obtain $K_2(P)$."

$$T(K_1(P), X(K_1, K_2)) = K_2(P)$$

Is this even possible? What cryptosystem should Alice use?