Creating and managing encryption keys  Using encryption keys

New Features Adaptive Server® Enterprise 12.5.3a

Creating encryption keys

All the information related to keys and encryption is encapsulated by the create encryption key, which allows you to specify the encryption algorithm and key size, the key's default property, as well as the use of an initialization vector or padding during the encryption process.

Column encryption in Adaptive Server uses the Advanced Encryption Standard (AES) symmetric key encryption algorithm, with available key sizes of 128, 192, and 256 bits. Random key generation and cryptographic functionality is provided by Security Builder Crypto™ API.

You can create separate keys for each encrypted column. Keys can be shared between columns, but each column can have only one key. To encrypt one column using an initialization vector and one column without using an initialization vector, create two separate keys, one that specifies use of an initialization vector and one that specifies no initialization vector.

The System Security Officer uses the as default clause in the create encryption key to set a default encryption key for the database. The default key is used whenever the encrypt qualifier is used without a key name on create table or alter table.

To securely protect key values, Adaptive Server uses the system encryption password to generate a 128-bit key-encrypting key, which in turn is used to encrypt the newly created key. The column-encryption key is stored in encrypted form in the sysencryptkeys system table.

Figure 2: Encrypting user keys

The syntax for create encryption key is:

create encryption key keyname [as default] for algorithm 
[with [keylength num_bits] 
[init_vector [null | random]] 
[pad [null | random]]]

where:

For example, to specify a 256-bit key called “safe_key” as the database default key, the System Security Officer enters:

create encryption key safe_key as default for AES with         keylength 256

The following example creates a 128-bit key called “salary_key” for encrypting columns using random padding:

create encryption key salary_key for AES with          init_vector null pad random

This example creates a 192-bit key named “mykey” for encrypting columns using an initialization vector:

create encryption key mykey for AES with keylength 192          init_vector random

The System Security Officer has default permission to create encryption keys and may grant that permission to other users.

For example:

grant create encryption key to key_admin_role




Copyright © 2005. Sybase Inc. All rights reserved. Using encryption keys

View this release bulletin as PDF