Have some third party (or several) that LW would trust hold on to it in secrect.
Nitpick: cryptography solves this much more neatly.
Of course, people could accuse you of having an efficient way of factorising numbers, but if you do karma is going to be the least of anyone’s concerns.
You could create Horcruxes as a side-product of capital punishment, something Harry doesn’t seem to mind.
Maybe you could kill people who were about to die anyway, and consented? Could you use abortion in this manner?