Il cifrario di Vigenère è un ottimo esempio di cifrario a sostituzione di tipo
polialfabetico ed è dovuto agli studi di Blaise de Vigenère, che visse nel diciassettesimo secolo.
Sia m un intero positivo fissato. Definiamo =
=
=
.
Si ricordi che
è l'insieme delle stringhe di lunghezza m su
.
Per una chiave k = (
)
, definiamo la funzione di
cifratura come
e quella di decifratura come
dove tutte le operazioni sono fatte in .
Utilizzando la corrispondenza ,
, ...,
della Tabella 1, possiamo associare ogni chiave k con
una stringa alfabetica di lunghezza m.
L'idea del cifrario è di codificare m caratteri alfabetici alla volta: il messaggio viene partizionato in blocchi di m caratteri e ogni blocco è cifrato con la stessa chiave. Ai blocchi di n;SPMlt; m caratteri vengono aggiunti i mancanti m-n in modo arbitrario. Lo spazio delle chiavi è .
Questo cifrario è stato ritenuto sicuro per circa due secoli, in quanto la chiave non è costituita solo dai valori
, ma anche dal numero delle
chiavi m.
Per semplicitá vediamo la cifratura con un esempio.
- Tabella di Vigenère -
a b c d e f g h i j k l m n o p q r s t u v w x y z
b c d e f g h i j k l m n o p q r s t u v w x y z a
c d e f g h i j k l m n o p q r s t u v w x y z a b
d e f g h i j k l m n o p q r s t u v w x y z a b c
e f g h i j k l m n o p q r s t u v w x y z a b c d
f g h i j k l m n o p q r s t u v w x y z a b c d e
g h i j k l m n o p q r s t u v w x y z a b c d e f
h i j k l m n o p q r s t u v w x y z a b c d e f g
i j k l m n o p q r s t u v w x y z a b c d e f g h
j k l m n o p q r s t u v w x y z a b c d e f g h i
k l m n o p q r s t u v w x y z a b c d e f g h i j
l m n o p q r s t u v w x y z a b c d e f g h i j k
m n o p q r s t u v w x y z a b c d e f g h i j k l
n o p q r s t u v w x y z a b c d e f g h i j k l m
o p q r s t u v w x y z a b c d e f g h i j k l m n
p q r s t u v w x y z a b c d e f g h i j k l m n o
q r s t u v w x y z a b c d e f g h i j k l m n o p
r s t u v w x y z a b c d e f g h i j k l m n o p q
s t u v w x y z a b c d e f g h i j k l m n o p q r
t u v w x y z a b c d e f g h i j k l m n o p q r s
u v w x y z a b c d e f g h i j k l m n o p q r s t
v w x y z a b c d e f g h i j k l m n o p q r s t u
w x y z a b c d e f g h i j k l m n o p q r s t u v
x y z a b c d e f g h i j k l m n o p q r s t u v w
y z a b c d e f g h i j k l m n o p q r s t u v w x
z a b c d e f g h i j k l m n o p q r s t u v w x y