19.06.2013 Views

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Each CP on the z990 has an assist processor on the chip in support of cryptography. This<br />

feature provides <strong>for</strong> hardware encryption and decryption support. Peripheral Component<br />

Interconnect Extended Cryptographic Coprocessor (PCIXCC) provides a cryptographic<br />

environment with added function. The PCIXCC consolidates the functions previously offered<br />

on the z900 by the Cryptographic Coprocessor feature (CCF) and the PCI Cryptographic<br />

Coprocessor (PCICC) feature. For a more detailed discussion of CPACF and PCIXCC, refer<br />

to the book <strong>IBM</strong> eServer zSeries 990 (z990) Cryptography Implementation, SG24-7070.<br />

Applications implementing <strong>DB2</strong> encryption must apply the <strong>DB2</strong> encrypt and decrypt built-in<br />

functions <strong>for</strong> each column to be encrypted or decrypted. All encrypted columns must be<br />

declared “<strong>for</strong> bit data”. So, unchanged read-applications see data in encrypted <strong>for</strong>m.<br />

Applications may apply a different key <strong>for</strong> each column, but may also supply the key in a<br />

special register. It is strongly recommended <strong>for</strong> per<strong>for</strong>mance to specify the key in the special<br />

register.<br />

LOAD and UNLOAD utilities do not support <strong>DB2</strong> encryption, but SQL-based programs such<br />

as DSNTIAUL do support encryption. Encryption of numeric fields is not supported. The<br />

length of encrypted columns must allow <strong>for</strong> an additional 24 bytes, rounded up to a double<br />

word boundary. So, space usage may be a concern if you plan to use <strong>DB2</strong> to encrypt small<br />

columns.<br />

Indexes are also encrypted. Predicates that depend on the collating sequence of encrypted<br />

columns, (<strong>for</strong> example range predicates), may produce wrong results (unless modified to use<br />

built-in functions correctly). For example:<br />

SELECT COUNT(*) WHERE COL = :HV;<br />

produces wrong results.<br />

SELECT COUNT(*) WHERE COL = ENCRYPT_TDES(:HV);<br />

produces correct results and almost no impact to per<strong>for</strong>mance.<br />

SELECT COUNT(*) WHERE COL < ENCRYPT_TDES(:HV);<br />

produces wrong results.<br />

SELECT COUNT(*) WHERE DECRYPT_CHAR(COL) < :HV;<br />

produces correct results with large impact on per<strong>for</strong>mance.<br />

<strong>IBM</strong> Data Encryption Tool <strong>for</strong> IMS and <strong>DB2</strong> Databases<br />

<strong>IBM</strong> also offers an encryption tool called <strong>IBM</strong> Data Encryption Tool <strong>for</strong> IMS and <strong>DB2</strong><br />

Databases. This tool per<strong>for</strong>ms row level encryption using EDITPROCs. Unlike the <strong>DB2</strong><br />

encryption functions shipped with <strong>DB2</strong>, the Data Encryption Tool uses different keys to<br />

encrypt different tables. The encryption keys can be either clear, like the <strong>DB2</strong> encryption<br />

functions, or secure and they are managed through ICSF (Integrated Cryptographic Service<br />

Facility). Clear keys are generally better per<strong>for</strong>ming. The tool also supports single, double, or<br />

triple DES. Once again, refer to the book, <strong>IBM</strong> eServer zSeries 990 (z990) Cryptography<br />

Implementation, SG24-7070, <strong>for</strong> a more detailed explanation of clear keys and secure keys.<br />

You can find more in<strong>for</strong>mation about the <strong>IBM</strong> Data Encryption Tool <strong>for</strong> IMS and <strong>DB2</strong><br />

Databases by visiting the Web site at:<br />

http://www.ibm.com/software/data/db2imstools/db2tools/ibmencrypt.html<br />

The <strong>IBM</strong> Data Encryption Tool <strong>for</strong> IMS and <strong>DB2</strong> Databases supports all versions of <strong>DB2</strong> but<br />

only encrypts the whole row. No application changes are required, however the DDL must be<br />

modified to include the EDITPROC. The applications do not need to be aware of encryption<br />

keys.<br />

Chapter 4. <strong>DB2</strong> subsystem per<strong>for</strong>mance 189

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!