The Prime Minister John Key says he won't reveal the name given to him as the identity of the hacker known as Rawshark, and won't pass it on to police.

"In the end if the individual who told me wants to tell the police they are welcome to do that," Mr Key said at a media conference today.

In a new chapter in John Key: Portrait of a Prime Minister, devoted to this year's election campaign, Mr Key is quoted as saying: "Someone phoned and told me who the hacker was, but other than having a look at this person, I thought, 'Oh well ... nothing will come of it. Life goes on'."

Mr Key said today he had learned from the Teapot Tapes scandal in 2011.

Advertisement

"I could spend my life worrying about people who undertake activities to try to discredit the government but at the end of the day it doesn't take you anywhere."

Asked whether he thought the police should be focused on investigating potential identities of Rawshark rather than investigating journalist behind the "Dirty Politics" book, Nicky Hager, Mr Key said: "That's a matter for them... they run their own inquiries."

But the fact that Mr Key knows who hacked Whale Oil blogger Cameron Slater's computer and produced the source material for Nicky Hager's book Dirty Politics means the Prime Minister's office and home should be searched by police investigating the matter, Green Party Co-leader Russel Norman says.

A police inquiry into the hacking of the emails saw police conduct a lengthy search of Hager's Wellington home.

Dr Norman this afternoon said: "'If this is the Prime Minister now saying that he thinks he knows who Rawshark is the question for the police is why aren't they raiding his house?

"The police spent 10 hours going through Nicky Hager's house because Nicky Hager supposedly knows who Rawshark is, well the Prime Minister is now on the public record saying he knows who Rawshark is. I would expect the police to be consistent and even handed and to raid the Prime Minister's house and his office to find out who Mr Key thinks Rawshark is."

Mr Key did not divulge the name of the person to the biography's author, senior Herald editorial writer John Roughan. Asked yesterday whether the PM had referred the name to the police investigation into the stolen emails, a spokeswoman for Mr Key said though he believed he knew who the hacker was, "he cannot be certain".

Dr Norman said that if Mr Key wanted to avoid a 10-hour search of his home, "then maybe Mr Key should fess up and tell us who he thinks Rawshark is".

Roughan's book also quotes reports National Party campaign manager and Cabinet Minister Steven Joyce saying Mr Key's former senior media adviser Jason Ede stopped working for the National Party on the evening Dirty Politics was released at Wellington's Unity Books -- more than five weeks before the election.

That conflicts with a National Party statement released after the election which stated Mr Ede had resigned the day before the election.

Hager's book claims Mr Ede was a central figure in a political dirty tricks campaign run out of Mr Key's office.

Dr Norman said Mr Key should have said during the election campaign that Mr Ede was no longer working for the National Party.

"Mr Key seems to spend a lot of time as the leader of the National Party, not as the Prime Minister, so you'd think he would have known that Mr Ede was no longer working for the National Party as has been revealed today.

"If New Zealanders during the election campaign had known that Mr Ede was no longer working for the National Party they would have realised that there was a lot of weight in the very serious allegations in Nicky Hager's book, and that's why the National Party didn't want anyone to know that Mr Ede was no longer working for them."