The degrees form part of the UK's cyber security strategy published in 2011.
The strategy recognised that education was key to improving defences against hackers and online fraud.
Cabinet Office minister Francis Maude said internet cyber security was a "crucial part" of the government's long-term plan for the British economy.
He said the courses would help to make the "UK one of the safest places in the world to do business online".
He said: "Through the excellent work of GCHQ, in partnership with other government departments, the private sector and academia, we are able to counter threats and ensure together we are stronger and more aware."
UK universities were invited to submit their master's degree courses for certification.
The universities now running GCHQ-approved programmes in cyber security are Edinburgh Napier University, Lancaster University, the University of Oxford and Royal Holloway, University of London.
GCHQ has also given provisional accreditation to Cranfield University's cyber defence and information assurance course, and the University of Surrey's information security course.
A spokesman for GCHQ said the universities "were judged to provide well-defined and appropriate content, delivered to the highest standard".

The hole, which opened up in Grays, Essex, on Wednesday afternoon, also caused a gas leak.
Thurrock Council said experts believe a tunnel below the road - Hogg Lane - that links two quarries collapsed.
Further work will be done to establish if the collapse was "triggered by the road issue or vice versa," he added.
A National Grid spokesman said engineers were working to decommission a section of gas main where the sinkhole had caused a leak.
Meanwhile, the owner of the stranded lorry said he could lose up to Â£20,000 if the vehicle cannot be moved easily.
A hazard zone is still in place and the vehicle cannot be moved until surveyors have finished checking the road.
"I'm sick as a parrot. Every moment my truck's sat there, it's costing me money," said owner Steve Robinson.
His company, Robinsons LGV training based in Purfleet, has several pupils booked in for training and tests using the vehicle.
"It's got huge implications for me. As a rough estimate, if I don't get it back by Saturday, I'll have lost about Â£4,000, which is a lot of money for a small business.
He said he was concerned that if the lorry were to be damaged while being removed by tow truck or crane, he might have to pay out "anything up to Â£20,000".
David Bull, director of planning and transportation at Thurrock Council, said structural engineers were on site giving advice.
"We don't want to put someone in the lorry and cause vibration and then find the lorry falls further in through the hole," he told BBC Essex.

The body of Omar Omran was found at an apartment in the Riverside complex, Kimmage, on Monday evening. He had been stabbed to death.
His mother Maha Al Adheem, a doctor who is originally from Iraq, appeared at Dublin District Court on Thursday.
The 42 year old was remanded in custody until next week.
During the hearing, a detective sergeant gave evidence of the arrest.
He said that about 45 minutes after she was charged, Maha Al Adheem said: "Yes it was my knife. Yes it was my hand.
"It was not me.  It was the power."

The 32-year-old recorded a time of 34.259 seconds in Szeged in Hungary, improving on the 35.197 that won gold in Rio last year.
As in Brazil, Frenchman Maxime Beaumont was second, pipped on the line by Heath with 0.05 seconds between them.
Jon Schofield, Heath's partner and fellow Rio Olympic silver medallist in the K2 200m, finished ninth in 36.213.
The pair have been forced to focus on the single kayak event, since the K2 200m has been dropped from the Olympic programme for Tokyo 2020.
"This is a benchmark for the rest of the season for me," said Heath, from Guildford.
"The first race is the most nerve-wracking because you haven't seen each other for quite a few months, so it is good to get back on the water and see how they are doing in comparison to you."
Find out how to get into canoeing or kayaking with our inclusive guide.
Intelligence agency GCHQ has accredited six UK universities to teach specialist master's degree courses to future internet security experts.
[NEXT_CONCEPT]
A 10ft (3m) wide sinkhole that left a lorry stranded was caused by the collapse of a 100-year-old tunnel, experts have discovered.
[NEXT_CONCEPT]
A woman has appeared in court in the Republic of Ireland charged with the murder of her three-year-old son at their Dublin home earlier this week.
[NEXT_CONCEPT]
Britain's K1 200m Olympic champion Liam Heath won his first race of the season at the Canoe Sprint World Cup.