| dbms_obfuscation_toolkit |
|
|
| Written by Amit Poddar | ||||||
| Wednesday, 18 January 2006 | ||||||
Page 1 of 4 1.0 Introduction I looked at the basics of encryption here. Now lets try to encrypt database columns (salary and ssn in table EMPLOYEE) for real using dbms_obfuscation_toolkit. From the basics article, we need following for encryption: a) Encryption Algorithm: dbms_obfuscation_toolkit only supports DES algorithm. We will use Triple DES in our example b) Encryption Key: I will use Oracle's function dbms_obfuscation_toolkit.des3GetKey to generate Triple DES keys. I will use a separate key to encrypt each row. I will store each key in a separate table EMPLOYEE_KEY, and create a view over table EMPLOYEE that will join tables EMPLOYEE and EMPLOYEE_KEY and expose the decrypted values of the encrypted columns. c) Padding Scheme: Since dbms_obfuscation_toolkit does not support PKCS #5 for padding I will pad the data with chr(10)s (nulls). d) Block Chaining Scheme: dbms_obfuscation_tookit does not provide us with a option in this case. It uses CBC for block chaining. 2.0 Schema Design For This Example Let me describe the schema design a) Create schema owner poddar and grant him the necessary privileges to execute this example. b) Create user poddar_read_only who needs to see the decrypted data. c) Create table employee with columns: -Employee Id (Primary Key) All the columns to be encrypted are defined as raw. We will use the datatype raw through out to avoid problems with characterset conversion. The users will see the correct datatypes through the view. Each row in Employee will be encrypted by a different key stored in employee_key table. d) Create table employee_key. This table holds key which is used to encrypt rows in table Employee. It has following columns:
|
||||||
| Last Updated ( Sunday, 29 January 2006 ) | ||||||






