Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: DES3Encrypt

Re: DES3Encrypt

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Thu, 11 Mar 2004 23:17:18 +0100
Message-ID: <c2qodq$o64$1@news1.tilbu1.nb.home.nl>


Ruslan R. Laishev wrote:

> Hi !
> I playing with the follows piece of code is supposed to
> encrypt/decrypt data encrypted/decrypted with the ORACLE
> DES3Encrypt/Decrypt function:
>
> {
> unsigned status,i, len = ibuflen;
> des_key_schedule ks1,ks2,ks3;
> unsigned char *pblock = ibuf, padding_char,
> ivec1 [] = "0123456789ABCDEF",
> ivec2 [] = "0123456789ABCDEF",
> ivec3 [] = "0123456789ABCDEF";
>
>
> *retlen = 0;
>
> /*
> ** Check all keys for weakness
> */
> if ( status = des_key_sched((C_Block *)key1,ks1) )
> wr2_3des__log(status,"des_key_sched(k1)");
> if ( status = des_key_sched((C_Block *)key2,ks2) )
> wr2_3des__log(status,"des_key_sched(k2)");
> if ( status = des_key_sched((C_Block *)key3,ks3) )
> wr2_3des__log(status,"des_key_sched(k3)");
>
>
> if ( doEncrypt == DES_ENCRYPT )
> {
> des_cbc_encrypt(ibuf,obuf,ibuflen,ks1,ivec1,DES_ENCRYPT);
> des_cbc_encrypt(obuf,obuf,ibuflen,ks2,ivec2,DES_DECRYPT);
> des_cbc_encrypt(obuf,obuf,ibuflen,ks1,ivec1,DES_ENCRYPT);
> }
> else {
> des_cbc_encrypt(ibuf,obuf,ibuflen,ks1,ivec1,DES_DECRYPT);
> des_cbc_encrypt(obuf,obuf,ibuflen,ks2,ivec2,DES_ENCRYPT);
> des_cbc_encrypt(obuf,obuf,ibuflen,ks1,ivec1,DES_DECRYPT);
> }
>
> *retlen = ibuflen;
> return 0;
> }
>
>
>
> Frank van Bortel wrote:
>

>> Ruslan R. Laishev wrote:
>>
>>> Hello All!
>>>     I looking for a way to decrypt data encrypted with the 
>>> DBMS_OBFUSCATION_TOOLKIT.DES3Encrypt with the OpenSSL/DES routines set.
>>>
>>>
>>>     Thanks in advance.
>>>
>> See asktom.oracle.com

>
> " Sorry I have a large backlog right now, please ask a question later
> To ask a question click on the "Submit a New Question" button or Ask A
> Question."
>

But he has working examples - you just need to search for them.

BTW - the above isn't PL/SQL...

-- 

Regards,
Frank van Bortel
Received on Thu Mar 11 2004 - 16:17:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US