Using salt and MAC

In this recipe, you'll understand when you should use salt and MAC.

Getting ready

It is assumed that a keystore is opened and a master key is created.

How to do it...

  1. Connect to the database as a user who has administer key privilege or SYSKM privilege (for example, maja):
    $ connect maja
    
  2. Encrypt two columns in an existing table (for example, sh.customers)
    How to do it...

    Figure 15 - Using salt and MAC

How it works...

In step 2:

  • You encrypted the last_name column using the AES256 algorithm with salt and used MAC
  • You encrypted the cust_street_address column using the AES256 algorithm with no salt and used MAC

In general, you have to use same encryption algorithm ...

Get Oracle Database 12c Security Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.