late 14c., "arithmetical symbol for zero," from Old French cifre "nought, zero," Medieval Latin cifra, which, with Spanish and Italian cifra, ultimately is from Arabic sifr "zero," literally "empty, nothing," from safara "to be empty;" a loan-translation of Sanskrit sunya-s "empty." Klein says Modern French chiffre is from Italian cifra.
The word came to Europe with Arabic numerals. From "zero," it came to mean "any numeral" (early 15c.), then (first in French and Italian) "secret way of writing; coded message" (a sense first attested in English 1520s), because early codes often substituted numbers for letters. Meaning "the key to a cipher or secret writing" is by 1885, short for cipher key (by 1835).
Figurative sense of "something or someone of no value, consequence, or power" is from 1570s.