Pertemuan ke-8
Dr. Ir. R. Rizal Isnanto, S.T., M.M., M.T., IPM.
ADVANCED ENCRYPTION STANDARD
(AES): RIJNDAEL
Latar Belakang
DES dianggap sudah tidak aman
Perlu diusulkan standard algoritma baru sebagai pengganti DES
National Institute of Standards and Technology (NIST) mengusulkan kepada Pemerintah Federal AS untuk sebuah standard kriptografi yang baru
Pada tahun 1997, NIST mengadakan lomba membuat standard algoritma kriptografi yang baru. Standard tersebut kelak diberi nama Advanced Encryption Standard (AES).
Latar Belakang...
Persyaratan algoritma baru:
1. Termasuk ke dalam kelompok algoritma kriptografi simetri berbasis cipher blok.
2. Seluruh rancangan algoritma harus publik (tidak dirahasiakan) 3. Panjang kunci fleksibel: 128, 192, dan 256 bit.
4. Ukuran blok yang dienkripsi adalah 128 bit.
5. Algoritma dapat diimplementasikan baik sebagai software maupun hardware
Latar Belakang...
Di tahun 1998, ada 15 kandidat algoritma yang diterima, dan setelah
menjalani proses penelitian selama 1 tahun, maka didapatkan 5 algoritma yang dinyatakan sebagai finalis
– MARS (IBM corporation)
– RC6 (RSA Laboratories)
– Rijndael (J. Daemen & V. Rijmen)
– Serpent (E. Biham et al.)
– Twofish (B. Schneier et al.)
Latar Belakang...
Lima finalis lomba:
1. Rijndael (dari Vincent Rijmen and Joan Daemen – Belgia, 86 suara)
2. Serpent (dari Ross Anderson, Eli Biham, dan Lars Knudsen – Inggris, Israel, dan Norwegia, 59 suara) 3. Twofish (dari tim yang diketuai oleh Bruce Schneier –
USA, 31 suara)
Latar Belakang...
• Pada bulan Oktober 2000, NIST mengumumkan untuk memilih Rijndael (dibaca: Rhine-doll)
• Pada bulan November 2001, Rijndael ditetapkan sebagai AES
• Diharapkan Rijndael menjadi standard kriptografi yang
dominan paling sedikit selama 10 tahun.
Spesifikasi Algoritma Rijndael
• Rijndael mendukung panjang kunci 128 bit sampai 256 bit dengan step 32 bit
• Panjang kunci dan ukuran blok dapat dipilih secara independen
• Setiap blok dienkripsi dalam sejumlah putaran tertentu, sebagaimana halnya pada DES
• Karena AES menetapkan panjang kunci adalah 128,
192, dan 256, maka dikenal AES-128, AES-192, dan
Panjang Kunci (Nk words)
Ukuran Blok (Nb words)
Jumlah Putaran (Nr)
AES-128 4 4 10
AES-192 6 4 12
AES-256 8 4 14
Catatan: 1 word = 32 bit
• Secara de-facto, hanya ada dua varian AES, yaitu
AES-128 dan AES-256, karena akan sangat jarang
pengguna menggunakan kunci yang panjangnya 192
bit.
• Dengan panjang kunci 128-bit, maka terdapat sebanyak
2
128= 3,4 ´ 10
38kemungkinan kunci
• Jika komputer tercepat dapat mencoba 1 juta kunci setiap detik, maka akan dibutuhkan waktu 5,4 ´ 10
24tahun untuk mencoba seluruh kunci
• Jika tercepat yang dapat mencoba 1 juta kunci setiap
milidetik, maka dibutuhkan waktu 5,4 ´ 10
18tahun
Introduction (1) à cerita sumber lain J
In 1997 the National Institute of Standards and
Technology (NIST) of the United States put out a call for proposals for a new symmetric algorithm, that will be called the Advanced Encryption Standard (AES).
The algorithm DES was since 1976 the standard for
symmetric algorithms, and a replacement was necessary.
In 1998 15 candidate algorithms were accepted, and after one year of research 5 of these candidates were announced as finalists:
• MARS (IBM corporation)
• RC6 (RSA Laboratories)
• Rijndael (J. Daemen & V. Rijmen)
Introduction (2)
On all of these algorithms extensive research has been done to find attacks or weaknesses.
According to NIST, all 5 finalists appear to offer adequate security. Also much research has been done to test the performs of these 5 algorithms in both software and hardware.
In 2000 NIST announced that Rijndael was chosen as the
successor of DES, the AES. The combination of security,
Introduction (3)
The candidates for the AES algorithm had to fulfill certain design criteria.
1. First, of course the algorithm should be a symmetric
algorithm and it must be resistant against all known attacks.
2. Furthermore, the AES must be efficient in performance and memory for different platforms.
3. The design must be simple, and it should be able to handle different key lengths (128, 192 and 256 bits).
4. The block length of the cipher should be 128 bits.
This chapter gives a description of the Rijndael algorithm.
Mathematical tools (1)
This section gives a short introduction to the mathematics that are used in Rijndael.
Rijndael uses a finite field of the form GF(2
8), and here the basics of (finite) fields are presented such that the Rijndael algorithm can be understood.
GF stands for Galois Field and is an other name for
finite field.
Galois Field (GF)
1. Hanya berlaku terbatas, di luar GF tidak berlaku
2. Nilai Koefisien yang dikenal hanya 0 dan 1
3. Hanya ada tanda ‘+’, tidak dikenal tanda ‘-’
4. Operator yang dipakai: ‘+’ dan ‘X’.
5. Penjumlahan ‘+’ diberlakukan sebagai XOR (Exclusive OR)
6. Bilangan disajikan dalam 3 (tiga) cara: biner, polinomial dalam f(x), dan heksadesimal.
Contoh: f (x) = x3+x+1, dalam GF (23).
Secara biner ditulis sebagai 00001011.
Secara heksadesimal ditulis sebagai ‘0B’
Penjumlahan dalam GF
(1)Atau secara lengkap adalah sbb.
Penjumlahan dalam GF
(2)Perkalian dalam GF
Pembagian dan Modulo dalam GF
Contoh: berapakah ?
Jawab:
sehingga
Sekilas tentang Rijndael
First an overview of the Rijndael algorithm is given. Figure 1 shows the different phases of the Rijndael algorithm. It starts with an initial round followed by a number of
standard rounds and it ends with the final round. Only four different
operations are necessary to compute these rounds and a key schedule.
Each of these operations are
described separately in the next chapters.
Panjang Kunci dan Jumlah Ronde
Representasi Kunci dan Pesan dalam Matriks
Representasi Kunci dan Pesan dalam Matriks
Operasi AddRoundKey
(1)Operasi AddRoundKey
(2)Operasi SubBytes
(1) The operation SubBytes is similar to the S-boxes used in the DES- algorithm. Rijndael has only one S-box.
Operasi SubBytes
(2)PR (No. 1)
Operasi ShiftRows
(1) In ShiftRows (figure 3), the rows of State are cyclically shifted with different offsets.
Row 1 is shifted over c1 bytes, row 2 over c2 bytes, and row 3 over c3 bytes.
The values of c1, c2, and c3 depend on the block length Nb:
Operasi ShiftRows
(2)Operasi ShiftRows
(3)Pertemuan ke-2: Operasi MixColumns
(1)Operasi MixColumns
(2)Operasi MixColumns
(3) Contoh Soal: State s dinyatakan sebagai
Kolom 1
Kolom pertama (1)
Operasi MixColumns
(4)Catatan Penting
Untuk penomoran baris dan kolom terdapat 2 (dua) cara:
1. Dimulai dari angka 1: Baris pertama kolom pertama s(1,1), seperti yang ada pada contoh soal sebelumnya
2. Dimulai dari angka 0: Baris pertama kolom pertama s(0,0), terdapat pada banyak referensi, dan soal-soal latihan/UAS bisa
jadi menggunakan model ini. Jika ada dalam soal, sudah ditentukan menggunakan model 1 atau model 2. Harap teliti.
Bagaimana jika pangkat tertinggi dari f(x)
lebih dari 7?
(1)Bagaimana jika pangkat tertinggi dari f(x)
lebih dari 7?
(2)Bagaimana jika pangkat tertinggi dari
f(x) lebih dari 7?
(3)Bagaimana jika pangkat tertinggi dari f(x)
lebih dari 7?
(4)Ekspansi Kunci AES (key scheduling)
w[4] = w[0] SubWord(RotWord(w[3])) rcon(i/4) ; i = 4 w[5] = w[1] w[4] ; i = 5
w[6] = w[2] w[5] ; i = 6 w[7] = w[3] w[6] ; i = 7
w[8] = w[4] SubWord(RotWord(w[7])) rcon(i/4) ; i = 8
i 1 2 3 4 5 6 7 8 9 10
rcon(i) 01 02 04 08 10 20 40 80 1B 3C
Operasi SubWord =SubBytes
The operation SubBytes is similar to the S-boxes used in the DES- algorithm. Rijndael has only one S-box.
Contoh Soal:
Sekilas tentang Rijndael
First an overview of the Rijndael algorithm is given. Figure 1 shows the different phases of the Rijndael algorithm. It starts with an initial round followed by a number of
standard rounds and it ends with the final round. Only four different
operations are necessary to compute these rounds and a key schedule.
Each of these operations are
Panjang Kunci dan Jumlah Ronde
Solusi
Contoh soal 2: Mencari W
5Lanjutan Solusi
PR (2-4)
2.
3. Misalnya terdapat kunci AES sebagai berikut.
CA 14 10 90 FF AC DA 27 83 C1 BF 93 67 19 E1 32 Tentukanlah 4 byte pertama kunci ronde 1 (=w[4])
Ada pertanyaan?
Selamat belajar, semoga sukses
Terima kasih