• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 372
  • Last Modified:

DES3 in java and oracle

If the same sequence of bytes is to used to create a DES3 key in java and in ORacle would they yield the same results.

For instance we are encrypting data in java using des3 and want to load the data into Oracle.  ORacle des3 utilities will be used to decyrpt this data.

I am wondering would this work, would  these yield the same results?
0
inzaghi
Asked:
inzaghi
  • 4
  • 3
  • 2
  • +1
3 Solutions
 
Giant2Commented:
If the keys and the data are the same, de codification must be the same.
0
 
bvanderveenCommented:
Not familiar with DES3, but with most encryption, the results will not necessarily be the same (SHA-1, MD5).  You can decrypt to the same original result, but the encrypted value is likely to be different, even if encoded twice on the same system.
0
 
bvanderveenCommented:
But, I do think the result should be the same for decrypted answers.  If there is some difference in the algorithms, you can load java DES3 into the database as a Java Stored Procedure and call it that way, so it will be identical to your java result.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
TimYatesCommented:
> not necessarily be the same (SHA-1, MD5).  You can decrypt to the same original result

Just to point out that you can't decrypt MD5 ;-)

Just for people who might find this Q at a later date :-)
0
 
bvanderveenCommented:
>>Just to point out that you can't decrypt MD5 ;-)

You can too.  Submit your hash here:  http://passcracking.com/

They use "Rainbow tables" and a few algorithims over my head to do so.  

Almost nothing is uncrackable.
0
 
Giant2Commented:
Like I told before.
With DES if you cypher the same data with the same keys, you MUST obtain the same result.
(Obviously when decypher the decyphered data are the same).
DES is different from MD5. MD5 is classified as an hashing technique, so their behaviour are not the same.
0
 
TimYatesCommented:
> You can too.

Hmmm...that's brute force cracking...  not decrypting...  There is a slight (but significant) difference...
0
 
inzaghiAuthor Commented:
To finish off Its correct that using the same keys to encrypt in java with des3 and  des3 in oracle 9i would yield the same results.
0
 
Giant2Commented:
>To finish off Its correct that using the same keys to encrypt in java with des3 and  des3 in oracle 9i would yield the same results.

Yep!;
0
 
Giant2Commented:
Thanks.
:)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now