1

Not trusting those already available QR code generators available, I would want to program my own. The idea is to input a Bitcoin key ( private or public ) and the program would simply generate the corresponding QR code image as the output. Of course, this program would be run from an offline computer has to preserve a maximum security.

I haven't found any useful source of information about the procedure needed for my project. I've got fare experience in programming BASIC VBA C C++. I can probably figure out some Java or Python codes.

Essentially , I am looking for a tutorial showing the main procedure to input a Bitcoin key and construct the actual QR code.

1

2 Answers 2

3

You're mentioning private keys, which are obviously not supposed to be shared while the purpose of QR code is to share information.

A QR Code is the transformation of a string into a 2D picture. It could be URL or whatever text. There is no specification for Bitcoin about QR Code.

If you'd like to share a public address for payment purposes, you just have to generate the QR Picture using the public address, some exchange applications support it.

Edit: QR Code generation libraries exists for most of programming languages.

1
  • Thanks for your answer. Its absolutely relevant. My view on the question is that the QR code I want is for my own private utilization and never to be shared. I want this QR code to be printed on paper and then copied onto another material. Hence, the need for a QR code. I would certainly not send my private key over any website offering a QR code. Commented Mar 10, 2023 at 17:37
1

You can encode a bitcoin public address to a QR code using whatever QR code generator is suitable for your language of choice. There is no reason not to trust existing QR code generators, as these are usually open source and you can study them to make sure that they don't do anything nefarious.

If you want to program your own QR code generator you can do so, but this has nothing to do with Bitcoin. A Bitcoin QR code is simply a QR code of a string that represents a Bitcoin public address.

As for the content of your QR code, if you encode the public string for your address that's usually enough. However, you may want to look at BIP 0021. This proposes a URI standard that allows for other coins as well, and also lets you pass some more optional parameters such as a transfer amount, a label, and a message. Many wallets support this standard.

1
  • Yes, that is exactly what I want "If you want to program your own QR code generator you can do so, but this has nothing to do with Bitcoin." But I haven't had any result so far searching how I can learn how to program it, which was my original question. Commented Mar 10, 2023 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.