I live in a country where the government has strict rules against using bitcoin. in fact, they are trying to find out the citizens who are related to bitcoin. I was just wondering if they can catch me if I just mine bitcoin without doing any transaction? if yes then I wanted to know if there are any alternatives which can make me untraceable.
Data linking is the only way there is any question of privacy. When you transact with Bitcoin, the goods or service you order will need to have a delivery address. Also, if you send your BTC to any merchant, service or, an exchange that has your personal data there will be a presumption that the sender was the owner of the inputs used and is the person that they have records for. There is no known way around this.
Apart from that question which exists for all cryptocurrencies, you may wish to consider implementing some of the configuration for privacy from here for your mining setup. Sound advice is, do not break the law.
If you are going to mine any significant amount, you'll consume a substantial amount of energy, which may be noticed. For instance, if I were to install a single AntMiner S9 at my home, my electricity consumption would go up about 400%. If the government runs your electric company or can monitor their records, this sort of thing could prompt an investigation.
When a new block is mined, newly generated coins are placed in whichever address they are mined to. If you do not transact from the mining address to somewhere like an exchange that has your personally identifying information, there is no way to know who mined the coins based on the address alone.
As there is no easy way to determine who actually mined a block, and who is just relaying it to other nodes, you might suspected of mining simply by connecting to nodes in your area. Depending on the monitoring done by your government, connecting to any node in the world that your government is aware of may lead to suspicion.