How secure is the data recorded on the Bitcoin blockchain?
First off, it is worth noting that, technically speaking, the Bitcoin blockchain is nothing more than a public file of about 376GB, of which there are tens of thousands of identical copies scattered around the world.
Thus, it is not a single file held by a single manager who has the power to alter it, or which can be hacked with a single attack, but it is tens of thousands of identical copies that are effectively unhackable.
In other words, it is impossible for someone to hack all the machines on which a copy is stored, in order to alter all of them.
To be honest, it might be enough to modify most of them to alter their content, but even that seems implausible.
Even if someone managed to alter many of them, there would still be a few unaltered ones left to use to make comparisons, since some of the machines on which a copy is stored are practically unhackable.
This is very important because the protocol with which this file is built requires that anyone can check its correctness, given that the file is public and not encrypted.
In essence, it would be impossible to pass off an altered blockchain as good.
If someone managed to alter a few copies of the Bitcoin blockchain, the alteration would immediately come to light, and the existence of a few unaltered copies would make it easy to compare them and verify without a shadow of a doubt which is the altered one and which is the original.
In reality, it would also be possible to make an altered copy of the blockchain without it violating the protocol, but it would be so expensive that very few could afford to do so.
Moreover, the older the blocks are, the more difficult it would be to reconstruct them to conform to the protocol, so at most one could conceivably create a blockchain in which only the last few blocks are altered.
Security on Bitcoin
As can be seen from this reasoning, attempting to alter the Bitcoin blockchain is not worthwhile, because it would be extremely difficult and expensive to do so, and it would be virtually impossible for anyone to notice.
A different situation applies to new blocks, i.e. those that are added to the blockchain every 10 minutes or so. In this case, it would be possible to launch a 51% attack, to force the validator nodes to add new, altered blocks.
However, even in this case, the cost would be considerable, and it would be practically impossible to do this without anyone noticing. So it is simply not worth doing.
In light of this, it is possible to say that it is virtually impossible to change the data once it has been recorded on the Bitcoin blockchain, where it therefore enjoys a very high degree of security.
It is still public data that can be viewed by everyone, although if it is a cryptographic hash for example, even if it is read by someone, it does not pose a problem.