Cipher reaches Arabic ṣifr, empty or zero, through Medieval Latin cifra. The French route includes cifre before English.
Sources
- Merriam-Webster: cipher
Word History supports the Arabic/Latin history and the definitions preserve the number and secret-writing senses.
- Merriam-Webster: zero
Noun Word History supplies the shared ancestor through zephirum.
- Collins: cipher
British Word origin supplies Old French cifre; its headword and COBUILD both list cypher.
- Online Etymology Dictionary · cipher
Meanings of the older forms on the word path.