I'm reading how Francesco Petrarch coined the terms "dark ages" and "middle ages" but I can't find anything remotely resembling a quote for where he coined these terms.
Where, in what poem or letter, were these terms first coined?
In 1367, Petrarch, after discovering the works of Cicero, and others sharp thinkers of antiquity, introduced, supposedly, the concept of the dark ages.
“Amidst the errors there shone forth men of genius; no less keen were their eyes, although they were surrounded by darkness and dense gloom.” — Petrarch (1367), Defense Against the Calumnies of an Anonymous Frenchman
Still searching for his quote regarding the middle ages...
In the book Petraca letterato. Lo scrittoio del Petrarca by Giuseppe Billanovich, the author explains how Petrarca had arrived in Verona at the court of Mastino della Scala fleeing the siege of Parma in 1345. He discovered some letters from Cicero at the Chapter Library (biblioteca capitolare) and he began to transcribe them, when he had the idea of writing his own collection of letters. In words of Giuseppe Billanovich:
L'impegno più caloroso lega ora e poi questo letterato, che pure per questa preferenza esce dai solchi fondi di secolari tradizioni di accademia, alle lettere in prosa: l'autentico epistolario; anche perché la gara con Cicerone e con Seneca, e insieme coi Padri cristiani, lo avvince più cordialmente di quella con Orazio e con Ovidio. Subito in quei giorni veronesi immagina quella serie di lettere agli antichi che sempre vide connessa saldamente allo sviluppo delle due sezioni dell'epistolario: e naturalmente la avvia con una prima epistola a Cicerone; a cui ne unisce una seconda pure diretta allo stesso classico pochi mesi dopo in Provenza.
The warmest commitment now and then binds this intellectual, who also for this preference emerges from the deep grooves of centuries-old academy traditions, to the letters in prose: the authentic correspondence; also because the competition with Cicero and Seneca, and together with the Christian Fathers, binds him more cordially than that with Horace and Ovid. Immediately in those days in Verona he imagines that series of letters to the ancients which he always saw firmly connected to the development of the two sections of the correspondence: and naturally he initiated it with a first epistle to Cicero; to which he joins a second one also directed to the same classic a few months later in Provence.
In the epistle XXIV, 3, "Epistola ad Ciceronem" in Epistolae familiares, you can see how Petrarca uses the metaphor of darkness saying that himself is like a traveler in the darkness illuminated by the light of classics:
Heu et fraterni consilii immemor et tuorum tot salubrium preceptorum, ceu nocturnus viator lumen in tenebris gestans, ostendisti secuturis callem, in quo ipse satis miserabiliter lapsus es.
This translation comes from Google translate:
Alas, and forgetful of brotherly advice and of your many salutary preceptors, like a night traveler carrying a light in the darkness, you showed me the path to follow, in which you yourself quite miserably fell.
You see that in Petrarca the use of darkness and light is only a metaphor: there is no explicit reference to medieval period. The first one to use a term related to darkness to refer to Early Middle Ages was Cesare Baronio in his Annales Ecclesiastici, published between 1588 and 1607, as you can read in the book Excerpta di storia della Chiesa. Dal secolo oscuro alla Rivoluzione francese (IX-XVIII sec.) by Carlo Giuseppe Adesso:
«*Et incipit annus Redemptoris nongentesimus [...] quo et novum inchoatur saeculum, quod sui asperitate ac boni sterilitate ferreum [...] atque inopia scriptorum appellari consuevit obscurum» («iniziò [...] un secolo che per la sua durezza e l'infertilità di bene, fu definito ferreo [...] e per la totale assenza di scrittori fu denominato oscuro»>), C. BARONIO, Annales Ecclesiastici, vol. 15, Barri-Ducis, Ludovico Guérin, Milano 1868, p. 467.
Now, I will try to translate from Italian to English:
a century [...] began that for his hardness and infertility of good, was defined as iron [...] and due to the total absence of writers it was called dark
Againn, the first reference to medieval period with something related to the concept of "middle" was not from Petrarca, but from Italian humanist Giovanni Andrea de Bussi, as you can see in the PHD thesis Varietà e conoscenza nel pensiero di Niccolò Cusano, who in 1469 wrote (emphasis mine):
Vir ipse, quod rarum est in Germanis, supra opinionem eloquens et latinus, historias idem omnes, non priscas modo, sed mediae tempestatis, tum veteres, tum recentiores usque ad nostra tempora, memoria retinebat.
This translation came initially from Google translate, then it has been modified with the suggestion of Gareth Rees:
The man himself, which is rare among the Germans, being able to speak beyond belief and in Latin, kept in his memory all the same stories, not just the ancient ones, but those of the middle time, both old and more recent up to our own times.