Kryptografiske teknikker
Kryptografisk prosess Orginale data Orginale data Klartekst Klartekst Kryptogram Krypter Dekrypter NK ND
Transposisjonering/Permutering V A T E V R I P T E A V R I P T E A P R I V A T E P R I V A T E Transposisjoner Permuter Krypter Send Dekrypter
Transposisjonering vha. matrise Lag matrise Gjenoppbygg matrise F I R E T H M S L A O U FHSTIEIFRMLOEIEUTSAR F I R E T H M S L A O U FIRET HEMIS SILEA TFOUR FIRET HEMIS SILEA TFOUR Krypter Dekrypter Send
Substitusjon (eks. Caesar) Ci = E(Pi) = Pi + 3 Klartekst Kryptert Klartekst Kryptert
XOR 1 1 1 1 1 1 1 XOR = 1 1 1 1 XOR =
Inverse Initial Permutation Input DES Initial Permutation Permutasjoner L0 R0 Substitution Key Substitusjoner Permutation XOR L1 (=R0) R1 Substitution Key Permutation . . L16 (=R15) R16 Inverse Initial Permutation . Input
Permutasjon 1 1 Inndata Utdata
Permutert utvalg 1 1 Inndata Utdata
Ekspansjonspermutasjon Utdata Inndata
Inverse Initial Permutation Input DES Initial Permutation L0 R0 Substitution Key Permutation L1 (=R0) R1 Substitution Key Permutation . . L16 (=R15) R16 Inverse Initial Permutation Input
Initiell permutasjon (64bit) 0 1 1 0 1 0 1 1 ….. 1 17 33 49
Inverse Initial Permutation Input DES Initial Permutation L0 R0 Substitution Key Permutation L1 (=R0) R1 Substitution Key Permutation . . L16 (=R15) R16 Inverse Initial Permutation Input
Permuterte data Venstre halvdel Høyre halvdel Nøkkel “shifted” Permutert nøkkel Ny venstre halvdel (Gammel høyre) Ny høyre lavdel
Inverse Initial Permutation Input DES Initial Permutation L0 R0 Substitution Key Permutation L1 (=R0) R1 Substitution Key Permutation . . L16 (=R15) R16 Inverse Initial Permutation Input
Li-1 Ri-1 32 bits 32 bits Ekspansjons Permutasjon 48 bits Nøkkel Shiftet 56 bits Permutert utvalg 48 bits S-Box Substitusjon, Perm. valg 32 bits P-Box Permutasjon Li Ri
Ekspansjonspermutasjon
“Shift” av nøkler
Permutert utvalg
S-bokser ……. B1 B2 B3 B4 B5 B6 B7 B8 Bit 1 6 7 12 43 48 Bits 1-6 1-4 7 12 ……. 43 48 Bits S1 1-6 1-4 S2 7-12 5-8 S3 13-18 9-12 S4 19-24 13-16 S5 25-30 17-20 S6 31-36 21-24 S7 37-42 25-28 S8 43-48 29-32 Bits
S-boks tabell (f.eks. 011011)
P-boks permutasjon
Inverse Initial Permutation Input DES Initial Permutation L0 R0 Substitution Key Permutation L1 (=R0) R1 Substitution Key Permutation . . L16 (=R15) R16 Inverse Initial Permutation Output