View on GitHub

Oracle Application Level Encryption-Decryption

Oracle based application level Encryption and Decryption utilities for 10g and 11g(AES enabled)

Download this project as a .zip file Download this project as a tar.gz file

What is this about

Installation process

  1. Please place all the source code files provided in one single location ( preferably a single directory). Check if you need the 11g source code or the base 10g code. Keep only one set to avoid confusion.

    • error_log.ddl
    • ex_crypto_pkg.ddl
    • ex_crypto_pkg_body.ddl
    • run_before_install.sql
  2. Execute the file : run_before_install.sql to verify that there is no conflict with an existing object in your database. If there are any objects in the list generated by script then you may wish to manually inspect the DB object(s) before executing the next steps to avoid any data / object loss.

  3. Compile the script : error_log.ddl The script expects tablespace named 'ext_data_ts' to be present and accessible. Please replace the same with appropriate tablespace name OR remove the tablespace clause as applicable.

    E.g. : from unix prompt - after logging into oracle , fire the command @error_log.ddl

  4. Compile the script : ex_crypto_pkg.ddl

    E.g. : from unix prompt - after logging into oracle, fire the command @ex_crypto_pkg.ddl

  5. Execute wrap utility for hiding the source text in database reference tables :

    E.g : In a unix box , which has oracle connectivity defined (i.e. $ORACLE, $TNS_HOME etc. are defined) execute this command wrap iname=ex_crypto_pkg_body.ddl

    This will generate a file named : ex_crypto_pkg_body.plb

    Compile this file as usual : E.g : from unix prompt - after logging into oracle , fire the command @ ex_crypto_pkg_body.plb

  6. Verify that the encryption package is working properly by using the sample below:

    SELECT ex_crypto.f_decrypt(ex_crypto.f_encrypt('Exilant Technologies Pvt. Ltd.')) FROM DUAL;

    This command will validate both encryption and decryption functions. For detailed function list , please refer to Usage Instructions.

  7. Delete the source file(s) by removing them manually (so as to not to expose the logic to even DBA) :

    • ex_crypto_pkg.ddl
    • ex_crypto_pkg_body.ddl
    • ex_crypto_pkg_body.plb

Uninstall process:

Please ensure that the error log table and logging procedure don't have any other dependency or are getting used anywhere. Also, it is suggested to take a backup of error log table , in case the error logging module is to be used separately.

Compile the script : @uninstall_encryption.sql

This will systematically remove all components installed as part of the crypto module.