KEthereum icon indicating copy to clipboard operation
KEthereum copied to clipboard

EIP191 signature to PublicKey conversion

Open vchernetskyi993 opened this issue 3 years ago • 1 comments

KEthereum already has SignatureData to PublicKey conversion (org.kethereum.crypto.SignKt#signedMessageToKey), but I've stumbled on the need to convert EIP-191 personal signature to PublicKey (see this sample repo for use case https://github.com/vchernetskyi993/ethereum-server-auth).

From my perspective, these two new functions HexString.toSignatureData and personallySignedMessageToKey should be in the KEthereum code base, since they are quite re-usable across projects. Therefore, this PR.

@ligi please, review and tell me your thoughts (it's my first commit to your repo, so sorry in advance for any inaccuracies)

vchernetskyi993 avatar Aug 15 '22 15:08 vchernetskyi993

Thanks - in general a nice contribution! Just some nits and I would not use personallySignedbut personalSigned

renamed

vchernetskyi993 avatar Aug 16 '22 08:08 vchernetskyi993

Thanks!

ligi avatar Aug 17 '22 22:08 ligi