JUST when you thought it was safe to go into a referendum, suddenly out of the closet rattles the ghost of Lord Home of the Hirsal.

It was the last-minute intervention of the former Tory prime minister in March 1979 that, according devolutionary folklore, prevented Scotland from gaining an elected assembly in the referendum of that year. Baillie Vass, as he was called by Private Eye, advised Scots to vote No on the the grounds that the incoming Conservative government would bring forward new home-rule legislation "to get it right". In those days, the Scottish Conservative and Unionist Party was a significant force in Scottish politics, and the former MP for Lanark was considered a pretty straight kind of a guy. After all, he was the only prime minister ever to have played test cricket. But of course, along came Margaret Thatcher, who didn't play. The "something better" never materialised.

The present Tory Prime Minister, David Cameron, is also a pretty straight kind of a guy, and I'm sure he was sincere in his speech in Edinburgh on Thursday about his love for the Union and respect for Scotland and its history. But these words will haunt him: "When the referendum on independence is over, I am open to looking at how the devolved settlement can be improved further. And yes, that means considering what further powers could be devolved." History weighs heavily on any Tory prime minister offering Scotland jam tomorrow. Alex Salmond wasted no time in demanding to know exactly what powers the PM had in mind and why he was so opposed to Scots having a say on them.

Cameron's promise of a better devolution was either an unforced error, or the sign of a radical shift in Conservative policy on the constitution. Hadn't the new leader of the Scottish Tories, Ruth Davidson, said that there was no need for any new powers? That a "line in the sand" should be drawn under the Scotland Bill, currently limping through Parliament, and that talk of devo max only played into the hands of the Nationalists? Of course, the PM didn't mention devolution max, or any specific new powers. But it is very difficult to know what else he could mean other than some form of fiscal autonomy – the one option the PM refuses to put to the people of Scotland in the referendum.

The Scotland Bill implements the 2009 Calman Commission scheme for dividing income tax revenue between Holyrood and Westminster. Any further form of devolution beyond this would surely have to move in the direction of more tax powers, if it wants to meet the Scots voters half way. I suspect that, in the back of the PM's mind, there may lie a back-stop policy of abolishing the Barnett Formula and making Holyrood raise, through taxation, the revenue for most of its spending – while leaving foreign affairs, defence, currency and bank regulation with the UK. English public opinion would like it, and the quid pro quo would be a dramatic cut in the number of Scottish MPs in Westminster, which would certainly help the Tory cause in England since most Scottish MPs tend to be Labour. Cameron could then claim to have saved the United Kingdom from Alex Salmond and England from Ed Miliband.

But we are getting ahead of ourselves. The UK Government has yet to accept even the legitimacy of the independence referendum that the Scottish Government intends to stage in 2014. The PM stressed that "little progress" had been made in his meeting with Alex Salmond on the crucial issues of wording and the franchise. This is a long game and both sides have yet to show their hands. Cameron's speech – arguably the best crafted by a Unionist in Scotland since Donald Dewar – was all about hearts and minds. In fact, Dewar could easily have delivered much of it – especially the passage where Cameron claimed the UK was about "standing up for freedom and democracy around the globe, free healthcare for all, generous welfare for the poorest, and championing the most vulnerable on the world stage". These are not perhaps the policies most closely associated with the current Tory-led government in the UK. Labour's shadow foreign secretary, Douglas Alexander, might also sue for copyright. Cameron spoke of "a United Kingdom which is not monoglot, monochrome and minimalist, but multinational, multicultural and modern in every way". How many Tory backbenchers would be happy to quote that in their election leaflets?

Clearly, the PM is trying to make it easier for non-Tories to support his leadership of any No campaign in the forthcoming referendum. But it sometimes sounded as if Cameron also wants to invite Alex Salmond into his big tent. When he said that "nothing encapsulates the principle of pooling risk, sharing resources and standing together with your neighbour better than the United Kingdom", I was reminded of the First Minister's remarks about independence meaning "England losing a surly lodger and gaining a good neighbour".

Alex Salmond talks increasingly of a Social Union and recently even of a new "united kingdom" in which Scotland and England would co-operate on a wide range of common issues, not least by maintaining a common currency and customs union. The First Minister told the New Statesman last month that Scotland should be seen as a "beacon of progressive opinion" that could bring the UK back to precisely the social democratic values that David Cameron's Tories have rejected.

So, there's a lot of triangulation going on – on both sides. David Cameron is trying to sound a bit like Labour because Scotland is a Labour country; and Alex Salmond has been trying to sound a bit like a Unionist, by talking co-operation rather than separation. Indeed, the very word "separatism" is verboten in the Nationalist lexicon, and the SNP is trying to get the BBC to stop using it altogether. Independence nowadays is all about being good neighbours, and turning the UK into a caring, sharing collection of free nations securing the interests of each by looking to the interests of all.

But something is missing in all this touchy-feely constitutionalism. There is a serious issue of sovereignty lying behind all this good neighbour talk, which will ultimately have to be resolved. Sovereignty is about the power to make laws in a specific geographical jurisdiction, a nation. It is also about the power to enforce those laws through a state which possesses a monopoly of the means of violence. Sovereignty, as the term implies, was originally embodied in the sovereign, the monarch, who possessed indivisible and supreme legal authority.

Of course, we now live in a constitutional monarchy and the Queen no longer has any influence over legislation – though Prince Charles reserves the right to pass comment on bills he doesn't like. But the British Prime Minster still exercises sovereignty ultimately derived from the monarch. Moreover – and this is crucial – this power, in constitutional law, is still supposed to be indivisible. The UK Supreme Court insists that the "Crown in Parliament" remains sovereign and cannot be challenged by any actions of subordinate bodies like the Scottish Parliament, now or in the future. In the recent ruling over pleural plaques, the deputy president of the Supreme Court, Lord Hope of Craighead, laid it on the line that "the sovereignty of the Crown in Parliament ... is the bedrock of the British constitution".

In the forthcoming referendum, for the first time in 300 years, the indivisible sovereignty of Westminster is to be challenged by a rival claim. Over the centuries, many wars have been fought over sovereignty, from the American Civil War to the Irish War of Independence. Secession is still technically illegal in international law – though the United Nations Declaration of Human Rights says that "all peoples have the right to self-determination". Of course, in Scotland we don't do civil war, and there is zero likelihood of any Scottish national liberation army setting up to challenge London rule, whatever happens after the 2014 independence referendum. But questions of sovereignty are about political power in its most basic form, and we should never lose sight of this, as Scots prepare, in our uniquely peaceful and democratic manner, to make the momentous choice about where sovereignty lies.

The 17th-century political philosopher, Thomas Hobbes, argued that a monarchy or a democracy had to be sovereign precisely to avoid the risk of civil war. The state had to be a "Leviathan" – a supreme legal authority with the unchallenged right to make laws and to make wars. And while we no longer accept totalitarian concepts of the state, the idea of sovereignty is still very much about maintaining security. In his speech David Cameron echoed Hobbes by warning that the SNP were in danger of weakening the realm by dividing it. "Union helps to make Scotland stronger, safer, richer and fairer," he said. Indeed, many of the unreported parts of his Edinburgh speech were about the danger to Scotland of losing the security of the UK armed forces. The UK, which may no longer be a Leviathan, still has clout through its membership of the UN Security Council.

Behind all the warm words, legal battle lines are already being drawn up for a post-referendum showdown over sovereignty, especially if the result is close or the wording of the referendum question is – in Westminster eyes – ambiguous. There is an assumption that David Cameron will agree to pass a so-called "section 30" motion, which would devolve to Scotland the power to hold a legally binding referendum. But that is far from certain, and even if agreement is reached on the question and the franchise, it doesn't mean Westminster will necessarily accept the result.

If the vote is similar to the 1979 devolution referendum – 52% yes and 48% no – the UK Government might well refuse to recognise it. Similarly, if Westminster believes that the question on the ballot is loaded, then it might also declare the result unlawful. And even if it doesn't, the UK Supreme Court may well step in and declare that the referendum is illegal because no subordinate parliament has the right to challenge the sovereignty of Westminster.

Of course, this is ultimately a political rather than a legal question. But sovereignty is a scary subject, and is a problem for the SNP because Scots are a timid nation who don't like disruption and conflict.

The SNP leader has seen this coming, and has sought to defuse and confuse the sovereignty issue by insisting that after independence Scotland would retain the current sovereign, Queen Elizabeth II, and keep the 1603 Union of the Crowns. It's not the same thing of course, but it feels better. Indeed, Salmond seems to be prepared to contemplate the retention of many of the measures contained in the Acts of Union of 1707, in the common currency and the customs union with England.

Sovereignty clearly isn't what it used to be, and one of the most difficult questions Scots will have to ask themselves is whether the 2014 referendum, assuming it happens, is really about independence at all. The kind of pooled sovereignty envisaged by the SNP is a long way from Leviathan. It looks more and more like a form of federalism or confederalism, where the big issues of defence, foreign affairs, currency and banking regulation remain with a superior authority – a federal government, like Washington, as it relates to the states of the Union. When the SNP talk of sovereignty returning to the people of Scotland, they mean essentially that the Scottish Parliament should be given full tax-raising powers, not full economic powers. The Bank of England would remain the lender of last resort to Scottish banks, and would set interest rates for Scotland.

Alex Salmond insists, though, that his minimalist concept of independence still involves sovereignty being transferred from Westminster to Holyrood and that "the will of the people of Scotland" will be sovereign, as spelled out in the 1988 Claim of Right document. But it isn't entirely clear who the First Minister is seeking to fool by this, or even if he isn't fooling himself. Indeed, following what the Prime Minister has said, and given the fact that Labour and the Liberal Democrats also say that they want a new, improved devolution settlement, it is theoretically possible that Westminster could come up with a formula which they call "devolution", but Alex Salmond could call "independence".

Alex Salmond is the ultimate pragmatist and a master of constitutional ambiguity. He waves aside these questions and definitions – raised again last week by the Commons Scottish Affairs Select Committee – as if they are of no account. Independence, following Herbert Morrison, is whatever Alex Salmond says it is. And perhaps he is right to refuse to be pinned down. His handling of the sovereignty conundrum has brought huge political gains for the Scottish National Party, which has won two elections, one by a landslide, without ever spelling out what independence actually means.

And last week, the UK Prime Minister promised a new phase of devolution, with new powers for the Scottish Parliament, which Salmond can rightly claim would never have been offered had it not been for the people of Scotland voting SNP. Salmond sees independence as a process, and not an event, and anything that moves Scotland further down the road of home rule is OK by him. Perhaps one day Scotland will simply wake up and discover that it has become independent by stealth – and that it didn't have to leave the UK. Perhaps, inverting Lord Home's promise, Salmond is really saying: "Vote yes to independence and we'll deliver a better Union."