473,406 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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
9 2625
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Yoandy Rodriguez | last post by:
I'm developing a J2EE aplication and the project leader told me to investigate about the Data Access Object design pattern. I did some research at Sun's blueprints for the enterprise site but there...
0
by: rparimi | last post by:
Hi, I have encrypted data stored in a table on a DB2 database. The encryption algorithm used to store data in the table is not important. Using a perl script and the DBI module, I was able to...
5
by: Nico | last post by:
My database have 20 tables and many users. I wish to store encrypted data in 3 tables and have only 3 users have access to them, walking into tables or using forms. Can someone point me a direct...
4
by: Burke Atilla | last post by:
While encrypting data with DES through CryptoStream makes encrypted data bigger than original string. if we have 8 byte key and 8 byte of data then the mode is ECB. output encrypted data is 16 bytes...
3
by: Todd Gruben | last post by:
I am trying to send some encrypted data from a php application to be decoded in a .Net application. Both apps encode/decode a given string but generate different encrypted results. Anyone have...
1
by: hansyin | last post by:
HI, I got a problem about restoring data in mysql: I have 2 or more PCs installed with mysql database, with same or almost same table structure, but with different data. Can I combine those data...
6
by: Microsoft | last post by:
Im trying to do a new app where i can store most of my passwords, basically another "Password Keeper" style tool.... Question about this is what is the best way to store the data, as a plain XML...
2
by: lovesehuang | last post by:
need some help for source codes about Keep Data Secret Management System baseed on C/S Architecture.The other thnics we need is SQL,C++,VC++,can u tell me where can i get them or download them.it's...
14
by: wassssup | last post by:
hi guys..im new to datagridview and im wondering is there a way to convert an encrypted data in access and show it in a datagridview? im using C# and microsoft access normally this is how to show...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.