vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| PaulR wrote: > 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 ? 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 > 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. |
| Thread Tools | |
| Display Modes | |
|
|