How does blockchain technology handle the actual transaction data? My understanding of how a transaction is secured in blockchain, especially in bitcoin, is that the output of transaction data is locked to the recipient's address (a shorter version of his public key). When the recipient decides to use the token locked to his address, he generates a digital signature using his private key and runs a CHECKSIG function on his address and the digital signature to prove that he owns the private key. I assume the CHECKSIG function will return a True and unfreeze the cryptocurrency if the digital signature matches the locked address (i.e., public key).

However, it looks like the transaction is just a number concatenating outbound address and recipient's address plus the inputs and outputs (i.e., how much money is exchanged between two addresses). This website provides a closer look at the components of transaction data.




  Then how is the actual transaction data stored, encrypted and sent via
  blockchain?


For example, if A decides to buy some merchandise from B using cryptocurrency (merchandise can be digitalized, say, some valuable digital files), how are these files stored, encrypted and sent to B on the blockchain? Does blockchain technology handle the security issue of the actual digital merchandise?
how are these files stored, encrypted and sent to B on the blockchain?


They aren't. Those files are not stored on the blockchain nor are they transmitted to B using the blockchain.


  Does blockchain technology handle the security of the actual digital merchandise?


It can, if you make one that does. Bitcoin's does not.