The funding is coming from Vote Prime Minister and Cabinet, starting from the 2020 financial year.
Separately, Parliamentary Service will get an extra $250,000 a year from 2020 to "enable a lift in cyber security capability to meet the expectations of customers and to protect systems from external threats."
That comes after Australia's federal parliament was hacked in February this year.
The Computer Emergency Response Team (CERT) New Zealand is also getting a funding boost of $2.2 million a year, plus a $560,000 capital allocation to meet its mandate.
"Delays in a range of security projects due to availability of partners and external providers of specialist technical support" led to an increased appropriation for the current year of $424,000, taking its appropriation to $6.3m. That rises to $8.1m from next year.
The country's security and intelligence units got extra money to bolster national security in the wake of the Christchurch terror attack, with the GCSB getting an extra $39m over the horizon, front-loaded over the next two years.
The outward facing intelligence unit has a budget of $180m in the year just ending and $173.8m for next year, before it drops to $144.6m.
Meanwhile, the Security Intelligence Service gets an extra $11m over the forecast period, taking this year's budget of $83.6m to $106.1m in 2020. The SIS budget will fall back to around $85m in the out-years.