467,198 Members | 1,111 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,198 developers. It's quick & easy.

About Encrypted Data In DB2 UDB

Hi All

I have one column which has data type of varchar only. in this column
i want to store some secured data (I want to store this data by
encrpting using db2 encryption function).But along with this encrypted
data this column contains normal data also..

But in DB2 while storing encrypted data column should be defined FOR
BIT DATA.
In my case how should I go as my column contains both encrypted and
normal data in same column.

Thanks
Suresh

Apr 26 '06 #1
  • viewed: 2396
Share:
9 Replies
Suresh wrote:
Hi All

I have one column which has data type of varchar only. in this column
i want to store some secured data (I want to store this data by
encrpting using db2 encryption function).But along with this encrypted
data this column contains normal data also..

But in DB2 while storing encrypted data column should be defined FOR
BIT DATA.
In my case how should I go as my column contains both encrypted and
normal data in same column.

Split your column. The fact that some part of your column has different
requirements is an indicator that you should have different columns to
begin with.
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Apr 26 '06 #2
is there any way other than spliting column bcoz i am storing history
data in old value, new value pair in this table and i can not split the
columns.

Apr 26 '06 #3
Suresh,

Would it be ok for your data security policy, if you use encrypt scalar
function for your secured data? Use encrypt scalar function when
inserting your data.

insert into mytable values encrypt(...)

Regards,

Mehmet

Apr 26 '06 #4
While using scalar function of encryption on secured data , column data
type should be for bit data, otherwise i cannot use decrypt scalar
function to retrive data. But because of my design limitation i can not
place datatype as for bit data so any other way?

Apr 27 '06 #5
Suresh wrote:
While using scalar function of encryption on secured data , column data
type should be for bit data, otherwise i cannot use decrypt scalar
function to retrive data. But because of my design limitation i can not
place datatype as for bit data so any other way?

Suresh you can cast yoru string from and to for bit data.
CAST (c1 AS VARCHAR(10) FOR BIT DATA)
CAST (c1bit AS VARCHAR(10) FOR SBCS DATA)
Since this cast does nothing more that strip the codepage and place it
back it's non invasive.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Apr 27 '06 #6
Thanks it worked for me......

Apr 27 '06 #7
Suresh,

Can you post your encrypt and decrypt statements' final version ? Just
column phrases would be enough.

thanks

Mehmet

Apr 27 '06 #8
Here i am forwarding u exapmle with column name XYZ of Varchar type
DECRYPT_CHAR(CAST(XYZ AS VARCHAR(200) FOR BIT DATA))

May 2 '06 #9
But in DB2 while storing encrypted data column should be defined FOR
BIT DATA.
That sounds quite a pretty comprehensive statement.

We did not alter our columns when we ecnrypted a table on z/OS. For en/decryption we used the IBM supplied EDITPROC CRYPDSND. IBM Data Encryption for IMS and DB2 databases, V1.1
May 2 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Yoandy Rodriguez | last post: by
reply views Thread by rparimi@gmail.com | last post: by
3 posts views Thread by Todd Gruben | last post: by
1 post views Thread by hansyin@gmail.com | last post: by
6 posts views Thread by Microsoft | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.