slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
SQL SERVER ENKRIPSI PowerPoint Presentation
Download Presentation
SQL SERVER ENKRIPSI

Loading in 2 Seconds...

play fullscreen
1 / 36

SQL SERVER ENKRIPSI - PowerPoint PPT Presentation


  • 95 Views
  • Uploaded on

SQL SERVER ENKRIPSI. KRIPTOGRAFI.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'SQL SERVER ENKRIPSI' - haracha


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

SQL SERVER ENKRIPSI

KRIPTOGRAFI

  • Kriptografi (cryptography) berasaldaribahasaYunani”cryptos” artinya ”secret” (rahasia), sedangkan ”graphein” artinya ”writing” (tulisan). Jadikriptografiberarti ”secret writing” (tulisanrahasia). Kriptografiadalahilmudanseniuntukmenjagakeamananpesan (Bruce Schneier, 1996). Dalamkriptografiterdapatprosesenkripsidandekripsi

Inayatullah

slide2

SQL SERVER ENKRIPSI

Enkripsiyaitusuatuprosespengamansuatu data yang disembunyikanatauproseskonversi data ( plaintext ) menjadibentuk yang tidakdapatdibaca/ dimengerti.

Dekripsiyaitukebalikandariprosesenkripsiyaituproseskonversi data yang sudahdienkripsi ( ciphertext ) kembalimenjadi data aslinya ( Original Plaintext ) sehinggadapatdibaca/ dimengertikembali.

Inayatullah

slide3

SQL SERVER ENKRIPSI

KomponendariKriptografi

Plain text

Sumberberita/pesan/teksasli

Cipher text

Teks yang sudahdiproses (diacak, digantikan)

Algoritma & kunci

Misal: subsitusi (algoritma) & number of shift (kunci)

Pemisahanalg & kunciditemukanolehAugusteKerckhoffs von Niewenhof (1883)

Inayatullah

slide4

SQL SERVER ENKRIPSI

Contoh:

Inayatullah

slide5

SQL SERVER ENKRIPSI

Memiliki Algoritma

Contoh:

Inayatullah

slide6

SQL SERVER ENKRIPSI

PENGGUNAAN ENKRIPSI

Mengamankan data denganmengacak data sehinggasulituntukdibaca(confidentiality)

Meyakinkantidakadaperubahan data(Integrity)

Memastikanidentitasseseorangdengan digital

Signature(Authentication)

Inayatullah

slide7

SQL SERVER ENKRIPSI

H

I

R

A

R

K

I

Inayatullah

slide8

Encryption

SQL SERVER ENKRIPSI

Alice

SYMMETRIC KEY = > KUNCI ENKRIPSI DAN DEKRIPSI SAMA

Bob

Shared (secret) key

Decryption

Plaintext

Plaintext

Ciphertext

My phone555-1234

My phone555-1234

Y$3*@

Eve

Inayatullah

slide9

Encryption

SQL SERVER ENKRIPSI

Public key repositoryCertificate Authority (CA)

Public key

Private key

ASYMMETRIC KEY = > KUNCI ENKRIPSI DAN DEKRIPSI BERBEDA

Decryption

Plaintext

Plaintext

Ciphertext

My phone555-1234

My phone555-1234

L)8*@Hg

Inayatullah

slide10

SQL SERVER ENKRIPSI

ANSI X9.17 HirarkiEnkripsi

Inayatullah

slide11

SQL SERVER ENKRIPSI

  • HOW TO : BACK UP THE SERVICE MASTER KEY
  • HOW TO : RESTORE THE SERVICE MASTER KEY
  • HOW TO : ALTER THE SERVICE MASTER KEY
  • HOW TO : CREATE A DATABASE MASTER KEY
  • HOW TO : BACK UP A DATABASE MASTER KEY
  • HOW TO : RESTORE A DATABASE MASTER KEY
  • HOW TO : ALTER A DATABASE MASTER KEY

Inayatullah

slide12

SQL SERVER ENKRIPSI

1. BackUp Service Master Key

Contoh:

BACKUP SERVICE MASTER KEY TO FILE = N'C:\MyServiceMasterKey.key’

ENCRYPTION BY PASSWORD = N'$45^ZeF&u';

GO

Inayatullah

slide13

SQL SERVER ENKRIPSI

2. RESTORE (mengembalikan) SERVICE

MASTER KEY

Contoh:

RESTORE SERVICE MASTER KEY FROM FILE = N'C:\MyServiceMasterKey.key'

DECRYPTION BY PASSWORD = '$45^ZeF&u';

GO

Inayatullah

slide14

SQL SERVER ENKRIPSI

3. ALTER ( UNTUK MEMODIFIKASI ) SERVICE MASTER KEY

Contoh:

ALTER SERVICE MASTER KEY

WITH NEW_ACCOUNT = 'SQL2008Server\Michael',

NEW_PASSWORD = '^&3h4l1xPr';

GO

Inayatullah

slide15

SQL SERVER ENKRIPSI

4. CREATE DATABASE MASTER KEY

Contoh:

CREATE MASTER KEY ENCRYPTION BY PASSWORD = '123';

GO

Inayatullah

slide16

SQL SERVER ENKRIPSI

5. BACKUP MASTER KEY

Contoh:

BACKUP MASTER KEY TO FILE = N'C:\MyDatabaseMasterKey.key'

ENCRYPTION BY PASSWORD = N'123';

GO

Inayatullah

slide17

SQL SERVER ENKRIPSI

6. RESTORE MASTER KEY

Contoh:

RESTORE MASTER KEY FROM FILE = 'C:\MyDatabaseMasterKey.key'

DECRYPTION BY PASSWORD = '123'

ENCRYPTION BY PASSWORD = '456';

GO

Inayatullah

slide18

SQL SERVER ENKRIPSI

7. ALTER MASTER KEY

Contoh:

-- Add encryption by password

ALTER MASTER KEY ADD ENCRYPTION BY PASSWORD = '789';

GO

-- Remove encryption by password

ALTER MASTER KEY DROP ENCRYPTION BY PASSWORD = '789';

GO

Inayatullah

slide19

SQL SERVER ENKRIPSI

Catalog Views

1. Sys.Asymmetric_keys

SELECT

name,

asymmetric_key_id,

pvt_key_encryption_type_desc,

thumbprint,

algorithm_desc,

key_length,

public_key

FROM sys.asymmetric_keys;

slide20

SQL SERVER ENKRIPSI

2. SYS.CERTIFICATES

SELECT

name,

certificate_id,

pvt_key_encryption_type_desc,

subject,

cert_serial_number,

start_date,

expiry_date,

thumbprint

FROM sys.certificates;

slide21

SQL SERVER ENKRIPSI

3. SYS.CRYPTOGRAPHIC_PROVIDERS

SELECT

provider_id,

name,

guid,

version,

dll_path,

is_enabled

FROM sys.cryptographic_providers;

slide22

SQL SERVER ENKRIPSI

BUAT DATA YANG DI ENKRIPSI

/* 1. Membuat Database */

USE master

GO

CREATE DATABASE EncryptTest

ON PRIMARY ( NAME = N'EncryptTest', FILENAME = N'C:\EncryptTest.mdf')

LOG ON ( NAME = N'EncryptTest_log', FILENAME = N'C:\EncryptTest_log.ldf')

GO

Inayatullah

slide23

SQL SERVER ENKRIPSI

/* 2. Membuattabeldanisi data ketabel */

USE EncryptTest

GO

CREATE TABLE TestTable (FirstCol INT, SecondCol VARCHAR(50))

GO

INSERT INTO TestTable (FirstCol, SecondCol)

SELECT 1,'First'

UNION ALL

SELECT 2,'Second'

UNION ALL

SELECT 3,'Third'

UNION ALL

SELECT 4,'Fourth'

UNION ALL

SELECT 5,'Fifth'

GO

Inayatullah

slide24

SQL SERVER ENKRIPSI

/* 3. Cektabeldanisinya */

USE EncryptTest

GO

SELECT *

FROM TestTable

GO

Inayatullah

slide25

SQL SERVER ENKRIPSI

DATA YANG SUDAH DI BUAT

Inayatullah

slide26

SQL SERVER ENKRIPSI

/* 4. Membuat Database Master Key */

USE EncryptTest

GO

CREATE MASTER KEY ENCRYPTION

BY PASSWORD = 'SQLAuthority'

GO

Inayatullah

slide27

SQL SERVER ENKRIPSI

/* 5. MembuatSertifikat */

USE EncryptTest

GO

CREATE CERTIFICATE EncryptTestCert

WITH SUBJECT = 'SQLAuthority'

GO

Inayatullah

slide28

SQL SERVER ENKRIPSI

/* 6. MembuatKunciSimetrik */

USE EncryptTest

GO

CREATE SYMMETRIC KEY TestTableKey

WITH ALGORITHM = TRIPLE_DES ENCRYPTION

BY CERTIFICATE EncryptTestCert

GO

Inayatullah

slide29

SQL SERVER ENKRIPSI

/* 7. Enkripsi Data */

USE EncryptTest

GO

ALTER TABLE TestTable

ADD EncryptSecondCol VARBINARY(256)

GO

Inayatullah

slide30

SQL SERVER ENKRIPSI

/* 8. Mengupdatekolom */

USE EncryptTest

GO

OPEN SYMMETRIC KEY TestTableKey DECRYPTION

BY CERTIFICATE EncryptTestCert

UPDATE TestTable

SET EncryptSecondCol = ENCRYPTBYKEY(KEY_GUID('TestTableKey'),SecondCol)

GO

Inayatullah

slide31

SQL SERVER ENKRIPSI

/* 9. DROP original column which was encrypted for protect the data */

USE EncryptTest

GO

ALTER TABLE TestTable

DROP COLUMN SecondCol

GO

Inayatullah

slide32

SQL SERVER ENKRIPSI

/* 10. Mengecek Data yang sudahdiEnkripsi */

USE EncryptTest

GO

SELECT *

FROM TestTable

GO

Inayatullah

slide33

SQL SERVER ENKRIPSI

DATA YANG SUDAH DI ENKRIPSI

slide34

SQL SERVER ENKRIPSI

/* 11. MelakukanDekripsi Data */

USE EncryptTest

GO

OPEN SYMMETRIC KEY TestTableKey DECRYPTION

BY CERTIFICATE EncryptTestCert

SELECT CONVERT(VARCHAR(50),DECRYPTBYKEY(EncryptSecondCol)) AS DecryptSecondCol

FROM TestTable

GO

Inayatullah

slide35

SQL SERVER ENKRIPSI

DATA YANG SUDAH DI DEKRIPSI

slide36

SQL SERVER ENKRIPSI

TERIMA KASIH

Inayatullah