I think they are just trying to showcase a false nuclear power. North Koreans don't have the technology to make the nuclear payload small enough to be mounted on a missile. South Koreans claim that the video released by North Koreans is faked and must have been edited. But if that video was not edited and was true, chances are that they might have bought it from someone else. but as far as I know I think that this is just a message to their opposing countries that they might possess nuclear weapons.
North Korea might have received the tech from either Russia or China. NK defiantly has the tech but it could lack the know-how.