Given three pieces of information: message (string), signature (string), and public address (string), I want to verify the signature. In libraries for Javascript, Python and PHP this is a simple method call. However in BitcoinJ (Java), I cannot come up with a simple solution or example.
First, I only want to verify a signature. BitcoinJ is overkill, but it's the only Java library I've been able to find. It also doesn't seem to have a direct method call for what I need. There is a method call that requires the public key, but I have the public address. Discussions around the web indicate that the public key can be sourced from the signature. However it appears this isn't as straight forward as it sounds. Java also wants bytes instead of strings. Sounds easy enough, but efforts are not working. There are no examples I can find.
So can someone provide me an example of a simple message verification in Java (BitcoinJ or otherwise) with the above three pieces of information? TIA!
Posting my own answer: