I am trying to learn Bitcoin in some technical details, but I don't really understand the process of locking and unlocking scripts. I know that for what they are using, but can someone explain me some technical details. For example: Firstly wallet encrypt this transaction with private key etc...
I would be very grateful for good explanation.