There hasn't been a country who said that bitcoin is totally "illegal" those who made some regulations are China, Usa and probably the India, but they didnt said that bitcoin is ilegal, a regulation is something completely different. Just remember that China is not killing anyone just because using bitcoins, they are only shutting down some exchanges in their countries, but nothing more.
Bitcoin is legal in most countries all around the world.
I found a news saying that the Officials of the Peoples Republic of China announced in 2017 that the country will use their own digital currency. If that's the case, it is quite possible that every virtual currency other than the "official' one will become illegal.