The legend of the Seal of Solomon was developed primarily by medieval Arabic writers, who related that the ring was engraved by the name of God and was given to the king directly from heaven. The ring was made from brass and iron, and the two parts were used to seal written commands to good and evil spirits, respectively. In one tale, a demon, either Asmodeus, or Sakhr, obtained possession of the ring and ruled in Solomon's stead for forty days. In a variant of the tale of the ring of Polycrates from Herodotus, the demon eventually threw the ring into the sea, where it was swallowed by a fish, caught by a fisherman, and served to Solomon.
The date of origin legends surrounding the Seal of Solomon is difficult to establish. It is known that a legend of a magic ring with which the possessor could command demons was already current in the 1st century (Josephus 8.2 telling of one Eleazar who used such a ring in the presence of Vespasian), but the assocociation of the name of Solomon with such a ring is medieval. The Tractate Gittin (fol. 68) of the Mishnah has a story involving Solomon, Asmodeus, and a ring with the divine name engraved.
The specification of the design of the seal as a hexagram seems to arise from a medieval Arab tradition. The name "Solomon's seal" was given to the hexagram engraved on the bottom of drinking-cups in Arab tradition. In the Arabian Nights (chapter 20), Sindbad presented Harun al-Rashid with such a cup, on which the "Table of Solomon" was engraved. Hexagrams feature prominently in Jewish esoteric literature from the early medieval period, and some authors have hypothesized that the tradition of Solomon's Seal may possibly predate Islam and date to early Rabbinical esoteric tradition, or to early alchemy in Hellenistic Judaism in 3rd-century Egypt, but there is no positive evidence for this, and most scholars assume that the symbol entered the Kabbalistic tradition of medieval Spain from Arabic literature. The representation as a pentagram, by contrast, seems to arise in the Western tradition of Renaissance magic (which was in turn strongly influenced by medieval Arab and Jewish occultism); White Kennett (1660–1728) makes reference to a "pentangle of Solomon" with the power of exorcising demons.
The hexagram or "Star of David", which became a symbol of Judaism in the modern period and was placed on the flag of Israel in 1948, has its origins in 14th-century depictions of the Seal of Solomon. In 1354, King of BohemiaCharles IV prescribed for the Jews of Prague a red flag with both David's shield and Solomon's seal, while the red flag with which the Jews met King Matthias of Hungary in the 15th century showed two pentagrams with two golden stars.
Peter de Abano's Heptameron (1496) makes reference to the "Pentacle of Solomon" (actually a hexagram drawn on the floor in which the magician has to stand) to invoke various demons.
^"Solomon" , Jewish Encyclopedia: "Solomon is represented as having authority over spirits, animals, wind, and water, all of which obeyed his orders by virtue of a magic ring set with the four jewels given him by the angels that had power over these four realms. [...] It was Solomon's custom to take off the ring when he was about to wash, and to give it to one of his wives, Amina, to hold. On one occasion, when the ring was in Amina's keeping, the rebellious spirit Sakhr took on Solomon's form and obtained the ring. He then seated himself on the throne and ruled for forty days, during which time the real king wandered about the country, poor and forlorn. On the fortieth day Sakhr dropped the ring into the sea; there it was swallowed by a fish, which was caught by a poor fisherman and given to Solomon for his supper. Solomon cut open the fish, found the ring, and returned to power. His forty days' exile had been sent in punishment for the idolatry practised in his house for forty days, although unknown to him, by one of his wives" Baiḍawi, ii. 187; Ṭabri, "Annales," ed. De Goeje, i. 592 et seq.)."
^Sean Anthony, The Caliph and the Heretic: Ibn Saba' and the Origins of Shi`ism, 2011, p. 220.
^The story involves Solomon giving a ring and a chain to one Benaiahu son of Jehoiada to catch the demon Ashmedai, using the demon's help to build the temple; Ashmedai later tricks Solomon into giving him the ring and swallows it. "Solomon thereupon sent thither Benaiahu son of Jehoiada, giving him a chain on which was graven the [Divine] Name and a ring on which was graven the Name and fleeces of wool and bottles of wine. Benaiahu went and dug a pit lower down the hill and let the water flow into it13 and stopped [the hollow] With the fleeces of wool, and he then dug a pit higher up and poured the wine into it14 and then filled up the pits. He then went and sat on a tree. When Ashmedai came he examined the seal, then opened the pit and found it full of wine. He said, it is written, Wine is a mocker, strong drink a brawler, and whosoever erreth thereby is not wise,15 and it is also written, Whoredom and wine and new wine take away the understanding.16 I will not drink it. Growing thirsty, however, he could not resist, and he drank till he became drunk, and fell asleep. Benaiahu then came down and threw the chain over him and fastened it. When he awoke he began to struggle, whereupon he [Benaiahu] said, The Name of thy Master is upon thee, the Name of thy Master is upon thee. [...] Solomon kept him [Ashmedai] with him until he had built the Temple. One day when he was alone with him, he said, it is written, He hath as it were to'afoth and re'em ["the strength of a wild ox"], and we explain that to'afoth means the ministering angels and re'em means the demons. What is your superiority over us? He said to him, Take the chain off me and give me your ring, and I will show you. So he took the chain off him and gave him the ring. He then swallowed him, [viz. "it", the ring] and placing one wing on the earth and one on the sky he hurled him four hundred parasangs. In reference to that incident Solomon said, What profit is there to a man in all his labour wherein he laboureth under the sun." trans. M. Simon.
^Lane, "Arabian Nights" (1859; 1883), note 93 to chapter 20.
^Leonora Leet , "The Hexagram and Hebraic Sacred Science" in :The Secret Doctrine of the Kabbalah, 1999, 212-217.
^Schwandtner, Scriptores Rerum Hungaricarum, ii. 148. Facsimile in M. Friedmann, Seder Eliyahu Rabbah ve-Seder Eliyahu Ztṭa, Vienna, 1901
^Per Pentaculum Salomonis advocavi, dent mihi responsum verum; Heptameron, ed. Agrippa von Nettesheim, Henrici Cornelii Agrippae liber qvartvs De occvlta philosophia, seu de cerimonijs magicis, 1565. ed: Heinrich Cornelius, Karl Anton Nowotny. De occulta philosophia. Graz: Akademische Druck u. Verlagsanstalt, 1967, digital edition by Joseph H. Peterson, 1998, 2008.