Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2008

Tip: Looking for answers? Try searching our database.

encryption & unicode

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PaulR - 28 Feb 2008 12:23 GMT
Hi,
(DB2 9.1 LUW)

I have 'heard' that the encryption output of a character string, is
different depending on the database codepage.

i.e If we have encrypted data in a current non unicode database and we
recreate/migrate that Database to UTF-8, the encryption function
output,of a given string, would be different for the new DB ?

a. Is this true?
b. Is there some sort of config./option that allows the strings to be
encrypted the same in the new utf-8 DB?
       - Otherwise, this would mean de-crypting and re-encrypting
everything again.
c. Anybody had real experience of doing this?

Many Thanks.
Paul.
Madison Pruet - 28 Feb 2008 14:09 GMT
> Hi,
> (DB2 9.1 LUW)
[quoted text clipped - 5 lines]
> recreate/migrate that Database to UTF-8, the encryption function
> output,of a given string, would be different for the new DB ?

Encryption algorithms are based on the mathematical values of the
underlying data stream, not the logical value.  UTF-8 (or any code base)
is not going to generally use the same mathematical values to represent
the data stream the same as basic ASCII, even though the logical
representation is the same.  Therefore, it is improbable that the
encrypted value of the data stream is identical.  The same would be true
if an ASCII "hello world" character string were encrypted and compared
with an EBCDIC "hello world" character string - even with the same
encryption algorithm and the same encryption key.

Probably the only exception to this general rule would be the case where
only basic 7-bit ASCII characters are stored under UTF-8.  That is
because UTF-8 encodes 7-bit ASCII characters in the same way that the
character would be encoded in ASCII -- or at least I'm fairly sure of
that.  If the mathematical values of the character string are the same,
then the encrypted value should also be the same -- assuming also that
the same encryption algorithm and key is used.

> a. Is this true?
> b. Is there some sort of config./option that allows the strings to be
[quoted text clipped - 5 lines]
> Many Thanks.
> Paul.
PaulR - 28 Feb 2008 15:45 GMT
Hi Madison,

Many thanks for your thoughts.

fyi. from some sample testing that was done, it 'appeared' that even 7
bit ascii characters resulted in different encryption values. :-(
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.