Turkey will investigate a massive data breach that reportedly revealed sensitive identity data of about 50 million Turkish citizens, which is roughly two-thirds of the country's population.

Bekir Bozdag, the justice minister, announced on Wednesday a legal investigation had been launched, becoming the first Turkish official confirming the leak.

"I do not know from where and how this was leaked, but the [size of the data] is close to the number of the electorates in Turkey. We should look into how this breach happened," he said.

He also said that a new bill would be adopted to introduce an increased protection of personal data.

Hackers posted the purported database online in what is one of the largest public leaks of its kind.

Various random identity numbers and names of Turkish citizens entered in the database revealed authentic information confirmed by Al Jazeera.

Identity number is used to access a wide range of state services in Turkey such as voting, social security, military recruitment, medical care and banking.

The hackers highlighted information concerning Turkish President Recep Tayyip Erdogan, his predecessor Abdullah Gul and Ahmet Davutoglu, the prime minister.

Turkey faces security troubles in a renewed battle against the Kurdish Workers' Party (PKK).

Two suicide bombings blamed on the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) in recent months killed dozens.

Citizenship proposal

Separately, Bozdag said Turkey will work on a new rule to strip citizenship from Turks found to be supporting terrorism, a day after Erdogan said he wanted such a measure.

Erdogan first floated the idea on Tuesday in a speech to politicians. Since becoming president, he has transformed the largely ceremonial role into a more executive one, advocating for legislative moves and for the judiciary to take action.

Hours later, Ahmet Davutoglu, Turkey's prime minister, said there were no such plans under way, but Bozdag contradicted him on Wednesday.

"Erdogan envisages a new rule [for stripping citizenship]," Bozdag said live on television.

"Of course we will begin work on this."

Erdogan did not specify who he was targeting with the comments. In the past he said that those Turkey accuses of supporting terrorism - whether they are journalists or aid workers - are no different from terrorists themselves.

Rights advocates fear that anti-terrorism laws, already used to detain academics and opposition journalists, will now be used in courts to further stifle discussion of issues such as the Kurdish conflict.