Is it possible to exactly reverse engineer an unknown cipher inside a black box?
Judging by your comments, you are imagining a box that accepts inputs of arbitrary length. Hence it is a function $f:\{0,1\}^*\to\{0,1\}^*$. There are uncountably many such functions but only countably many programs you could propose as the "reverse engineered" result. This makes your problem fundamentally impossible.