What is Digital Signature?
It is a computer code that only you can sign but anyone else can verify.
Bitcoin uses ECDSA standard or Elliptic Curve Digital Signature Algorithm.
There is a complex mathematics behind the algorithm.
However, I want to share a big picture about how such Digital Signature works.

Before you continue, you can watch video below.
Here is a short well explain about digital signatures video below:
Remember Hash function which is an algorithm to generate secrete information into 256 bits of strings.
When you have a wallet, you have a pair of key - public key and private key.

All example keys below are fictional and cannot use for any cryptocurrencies transactions!
Using EC curve algorithm, we can generate
Public key: 04ff9eaef1aa25c453d2e54831f8b9ffb6b994a5ec567c678ff7b764fc0c253eb48b75ac8e6aa3d00e4fbdb03d214c84a94dd4da06510f7a1a700e9b1fbcd8513b

Private key: 524bb89cb22b5b153f003fd3fdcae0b6c303158581f4a816a6cd6be1e2644cba
![]()
File secretive message: hello world
![]()
Signature value: 3045022100b15d1e7d0bb8cf65ed78c705953c3ef5adff83ba19f71fdd8b9058767f43a833022076ab064cb9859d1c5cb34e58934b3864f6d609b90628d25302a866d8fc6cbde1

Pair keys generated by code:

Signature verify!
Using your private key to unlock and access signed message.
All example keys below are fictional and cannot use for any cryptocurrencies transactions!
Congratulation! You just complete a journey of digital signature performance!

In summary, you can have a pair of key, you use both keys to sign document while public key for anyone to validate but your private key is to access your secrete message in the document and validate your public key if you want to.
You can play around here.
I hope you learn something today!
Here are series of Bitcoin Technical Learning below if you are interested to learn:
Bitcoin Technical Learning Part 1 - Cryptographic Hash Function
Bitcoin Technical Learning Part 2 - Hash Pointer and Merkle Tree
