Specificity and sensitivity are terms used in the pharmaceutical and in vitro diagnostics (IVD) industries that have specific meanings relating to how the particular assay in question was validated. Generally the values are being compared to spiked standards in matrix using recombinant protein or purified virus or whatever the antigen is (depending on how the test operates) where the analyte concentrations are known. With a certain number of titrations and assay repeats, along with a bunch of statistical calculations, you can then compute your expected and actual recovery, as well as values like the LLOQ (lower limit of quantitation) which gives you your sensitivity (we can reliably detect 1e4 viral particles per ml, for example).
Specificity is calculated using related antigens, such as proteins from other types of bacteria that are of varying degrees of relation to syphilis, or perhaps of different serotypes that aren't claimed to be detected by the test, or whatever. Again, you spike known amounts of these materials into your testing matrix (blood, sputum, urine, semen, whatever) and see what your test returns. So, say I have a virus with 2 serotypes (A and B) that I claim recognizes A specifically. I spike in perhaps equal amounts (for example, 100 units) of A and B, then run the A-specific quantitation assay. The readout might then say the sample only had 75 units of A, meaning 75% specificity of the reagents.
For more reading, search for "clinical assay validation" or something similar. There are a ton of papers out there giving guidance for particular types of assays, as well as regulatory agencies' interpretations of the relevant laws covering the tests. There are also many books, reviews, etc. if you're just looking for an overview. It's a huge field, and I've just given a very basic description to avoid writing pages and pages.