# Fake non-membership proof in RSA accumulator

As explained in this answer, if one knows the trapdoor (factorization of modulus $$N$$) in an RSA accumulator, one can generate fake membership proofs. Does the same apply to non-membership proofs? More specifically:

Given $$A$$ is the value of an RSA accumulator and $$x$$ is a value present in $$A$$, if I know $$p$$ and $$q$$, where $$N = p \cdot q$$, could I generate a non-membership proof saying that $$x$$ is not in $$A$$?

Yes. More generally, suppose you know the size of the group $$\mathbb{G}$$ you are working in (RSA, class group etc).
Let $$A = g^n$$ where $$n$$ is the product of the elements in the committed set. Assuming $$n$$ is co-prime to $$|\mathbb{G}|$$, you can compute integers $$a_1$$, $$a_2$$ such that $$a_1 x + a_2 n \equiv 1 \pmod{|\mathbb{G}|}\;\;,\;\; |a_2| < |x|.$$ Setting $$w:= g^{a_1}$$ yields $$w^{x}A^{a_2} = g$$ and hence, the pair $$(w, a_2) \in \mathbb{G} \times \mathbb{Z}$$ works as a fake non-membership proof.