If you’ve been around cryptocurrency, such as DigiByte, for any manner of time, you’ll no doubt have heard the phrase “Public / Private Keys”.

This article looks to explain the basics, in an easy to understand manner, for those who are new to cryptocurrency.

You see, cryptocurrencies rely on math, and this math is both incredibly complex, but yet simple at the same time.

All wallet addresses for both DigiByte and all cryptocurrencies will have both a “Private Key” and a “Public Key” (A set of really really long numbers that always come in pairs), with the public key being generated and made as a result from the private key, using math.

This math is known as ECDSA, Elliptical Curve Digital Signature Algorithm, and it basically makes it really simple to “work out” the Public Key, if you know the Private Key, but basically impossible to get the Private Key if you only know the Public Key. For this reason, they’re aptly named Public / Private Keys, because one is public and can be freely shared with the world, whereas the other is private and should never be given out to anybody.

This is how you get your DigiByte Address in your Wallet, your Wallet is effectively a collection of private keys, these private keys are used to generate the public addresses that people then use to send DigiByte to.

Now don’t worry too much about inadvertently sending your Private Key to somebody, if you’re using DigiByte Core Wallet on your PC, or the DigiByte for Android app on your Cellphone, it only ever shows you the Public Address that you are free to share unless you’re specifically diving in to the debug menu running commands you know nothing about. DigiByte Core Wallet will even give you a big red warning in the event you find yourself accidentally there:

Now, it’s thanks to this ECDSA math being “one-way”, that you’re able to send and receive DigiByte. Because your address is “public” and anybody can see how much is in it, there needs to be a method of proving that it’s really you that wants to send your hard-earned DigiByte from your wallet, and not somebody else pretending to be you.

When this happens, a message is made, and signed with your Private Key. This basically means it does some math with your “I want to send 5 DigiByte from my wallet to Bobs wallet” message, using your Private Key, in such a way that it can then be read by anybody who has your Public Key, to verify that it was actually you who sent that message. If somebody was to try and read a transaction you’re making, with somebody elses Public Key, it won’t work and will end up looking like garbage. Similarly, if somebody were to try and send DigiByte from your address, using their Private Key, it also won’t work because your DigiByte address is your Public Key number.

For this reason, your Private Key acts as a “proof of identity”, it’s really you who is sending the message to “send 5 DigiByte from my wallet to Bobs wallet”, because it’s impossible for somebody to “work out” your Private Key, if all they have is your Public Key.

Keep in mind that when you do this, you’re not actually sending your private key, but if we were to liken it to primitive methods of encryption that you probably learned at school, if you were to take a message “Hello world” and substitute the letters for the next in the alphabet, you would get “Ifmmp xpsme”. Similarly, this is what happens to your transaction, except it’s sent using this Public / Private Key method, rather than just “the next letter in the alphabet”. Again though, because everybody has your Public Key, they can verify that it was you who sent that “Hello world” message, because if they tried to decrypt it using another key (Or, by going back 2 letters in the alphabet instead of 1), they would similarly end up with gibberish.

Using this method is the basis of how the entire DigiByte Blockchain works, anybody can send to your Public Address and increase your DigiByte, but it requires verification of “you being you” through manner of a message sent using your Private Key, in order for your DigiByte to be spent and sent to another party