YouYes, math behind this work. But it seems that you are asking, can both public and private exponent be the same value? It might workAnswer is no, butbecause you jeopardize the whole system collapses on itself. By choosing equal exponents, because in real life it would be uselessyou create two identical keys. As we are sending pubAnd if some eavesdropper steals public key via the web. Anyone, he can intercept and decrypt the message with the same key.