# What is Digital Key Cryptography?

Digital keys are nothing more than long strings of numbers (256 bits long for Bitcoin) and come in pairs – a public key and a private key.&#x20;

* **Public Key:**  A public key is similar to a bank account number as it serves as your address on a cryptocurrency network.  For example, instead of recording that “Alice owns 2 BTCs, the Bitcoin blockchain would record that “ 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2 owns 2 BTCs”
* **Private Key:**  A private key is similar to a secret PIN code that allows users to access and control their account.&#x20;

Every public key has only one private key, and – like a key and a lock – they are linked through cryptography.  The important thing to note about this link is that it only flows one way.  Although one can always access a public key with a private key, **it’s mathematically impossible to do the reverse**.&#x20;

&#x20;                                  **It’s Impossible to Decipher a Private Key from a Public Key**

<figure><img src="/files/mixht7zpObYPeUS6vnxm" alt=""><figcaption></figcaption></figure>

This one-way logic forms the basis of cryptocurrency transactions.  For example:

* **To Receive Funds:**  In order to receive funds, a user would share his public key with the sender, who would deposit the money in that address.  Because it’s impossible to decrypt a private key from the public key, this is completely safe (and necessary).&#x20;
* **To Send Funds:**  In order to send funds, a user would user her private key to “unlock” her public key on the blockchain to authorize the transfer of the money.  Again, because it’s mathematically impossible for anyone but the holder of the private key to do this, the blockchain can be sure that this person owns the funds.&#x20;

In practice, users rarely see either their keys, as they are often stored inside digital wallets and managed by software (i.e. you just click buttons that say “send” and “sign” on a wallet such as Metamask and the application does the rest for you).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.digitalnations.xyz/web3-overview/the-web3-ecosystem/cryptocurrencies/how-do-cryptocurrencies-work/how-are-cryptocurrencies-decentralized/what-is-digital-key-cryptography.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
