These algorithms can be substituted for better algorithms in a hard fork.
We already have empirical evidence that bitcoin is able to survive a hard fork as long as there is broad consensus about it.
If these functions are broken, it's likely that they will be broken gradually and there will be enough time to react.
How long is your investment timescale? 30 years?
IMO - some of these issues will arise alot sooner than 30 years, I think in just the next year or 2 years.
For example - there is going to have to be something done about the block size limit. However miners will not want to increase this limit, because it means less profit for them (because larger block size = less blocks mined). So maybe Bitcoin Foundation will decide to change some other aspect of the protocol to compensate for the miners - for example, they could allow the miners to 'mine' more coins. This would be good for the miners and resolve any conflict over loss of profit for the miners hence solving the block size issue, but would be bad for all private investors in bitcoin (because it would mean more coins issued above the 21m limit - which is after all just a convention in the software - therefore reducing value per coin).
I'm of course speculating, but its clear that the protocol is going to have to be changed and the people who have the most influence in changing it are not the individual investors who (Im assuming) are buying and using the currency - it's the big miners and bitcoin companies who are hugely represented in and by the Bitcoin Foundation board.
It's interesting how these things keep resurfacing :
https://bitcointalksearch.org/topic/could-bitcoin-eventually-crack-sha256-7769What worries me is that many people not capable of actually doing the research, or understanding the math, will tend to side with the xavier "Better to be safe than sorry", not realizing they are more likely to see a single person will a Mega Million lottery jackpot 1,000 times. I didn't perform the math to quantify that so it might actually that they would have to win it many magnitude more than that, I went low since even that number makes the point.
In order to break a hash you'll need to create a precomputed hash table which changes every time the difficulty changes. Since it'll take years to finish, and the difficulty changes every two weeks, it is not very likely to occur. The computational power to complete it in a few years is greater than the power of the current bitcoin network. Seems to me the money would be better spent trying to acquire 51% of the network.
Consider this, at the current difficulty we will only find 2016, of the 21,000,000 potential blocks with the current network hash rate. you would have to possess 10,416.6666 times the current network hash rate in order to build such a precomputed table. This is precisely why the higher the network hash rises the safer the network.