they straight up admitted it.
http://www.npr.org/sections/thetwo-way/2016/01/05/462098403/north-korea-says-it-conducted-hydrogen-bomb-test
Why wouldn't they admit it? The whole point of having just a couple of nukes is to go "don't fuck with me man, I have a
nuke!"
The idea that you'd secretly make a nuke then use it for some nefarious purposes is pure Hollywood B.S. Every state knows that the nuke would be traced back to them, then they'd be completely fucked. For example, Iran was provably making a nuke, but they cancelled the program in 2003. The reason was that the nuke was going to be a deterrent against Saddam invading them, and after the U.S. took out Saddam it was no longer needed.
Actually, the concept of a militarily hostile Iran in general is laughably "Hollywood". For example in a
recent article about the Iran/Saudi diplomatic standoff the BBC published figures on both country's military spending. Saudi Arabia spends $56 billion and Iran spends $6.3 billion, which is about 1.5% of GDP compared to Saudi Arabia's 10% of GDP. Despite what they'd like you to believe, the available facts don't support the idea that Iran is planning any sort of military incursions outside their borders: they're simply not investing in what they'd need for such a plan. Pentagon reports basically state that the entire Iranian defense spending is allocated to a series of echelon defenses to stop invaders. Since the spending is already low and it's all designed to make the place hard to invade, they have basically zero investment in what is called "force projection", unlike e.g. the USA where the bulk of the spending is about projecting force around the world.
Iran generally sends diplomats rather than armies to push their interests. That's not saying I'm a fan of Iran, but the idea that they are, or are aiming to be, some sort of military superpower is just laughable when you realize their defense spending is 1% of America's spending and is low even when looked at as a percentage.