Robert Hannigan, once the Government Communications Headquarters director, said the UK’s cyber capabilities – along with its allies – were “the best in the world”.
However, he said it was important for Britain not to escalate tensions between London and Moscow, following the attempted murder of a former Russian spy in Salisbury.
Mr Hannigan told Sky News: “We do have very advanced abilities in offensive cyber and of course with our allies, particularly the United States, we have the best in the world I think – but launching a cyber-conflict is not a trivial thing.
“It’s a bit like launching a military conflict and I don’t think anybody would benefit from that…it would be stepping into a different dimension and really playing the Russians at their own game – they don’t care how they behave.”
Mr Hannigan said Russia – who he called “completely reckless” – would “certainly hit back” if the UK launched cyberattacks but added that was not the main reason for staying away from cyberwarfare.
“I think the main reason for not doing it is opening up a new conflict – it is not the answer here,” he said. “We are the people who abide by international rules, by international law, and we want others to do the same.
“It’s important that we show Russia has made a choice not to do that and other countries are also running out of patience with Russia and they need to reflect on that and change and it will take a long time I think.
“I don’t think the answer is for us to escalate the conflict.”
He added: “We should operate consistently with our values – not theirs.”
The comments come as Theresa May ordered the expulsion of 23 undeclared Russian intelligence officers after reaching a stalemate with Vladimir Putin over the poisoning of Sergei Skripal and his daughter Yulia.
Mrs May said Russia had shown “complete disdain for the gravity of these events” after she issued a deadline for the country to explain how the Russian-made novichok was used in the attack.
Mr Skripal and his daughter Yulia remain in a critical condition.
Russia has branded the Prime Minister’s reaction to the attack a “crude provocation” and the diplomats’ expulsion a “hostile measure”.