Besides China, there are other sources North Korea can have used to aquiver this technology. Both North Korea, Libya, Iran and China did get help developing nuclear technology from a network set up by Abdul Qadeer Khan, a Pakistani nuclear physicist often regarded as the fonder of the Pakistani nuclear enrichment program.
He again acquired the technology in Europe when working for Urenco, a nuclear fuel company.
The whole Q.A Khan affair is quit a fascinating story actually.
Some more information on http://world.time.com/2011/07/07/a-q-khans-revelations-did-p... and https://en.m.wikipedia.org/wiki/Abdul_Qadeer_Khan
I did also see a very good documentary about this, but I can not find it online right now.
Edit: Here is the BBC documentary about Khans dealings in nuclear secrets: http://www.unewstv.com/6821/bbc-documentary-on-dr-abdul-qade... . Stranger then fiction, it has a plot like a top thriller movie.