It's not illegal. They did restrict their domestic Banks from dealing with crypto but even their own RBI ( The Reserve Bank of India) are even exploring on creating their own digital currency. They are not making it illegal in order for them to have a chance of creating their own coin while stymieing other coin growth in their country.