Solved

DES3 in java and oracle

Posted on 2004-09-01
10
365 Views
Last Modified: 2008-03-06
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
Comment
Question by:inzaghi
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 12

Expert Comment

by:Giant2
ID: 11953121
If the keys and the data are the same, de codification must be the same.
0
 
LVL 7

Assisted Solution

by:bvanderveen
bvanderveen earned 100 total points
ID: 11953843
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
 
LVL 7

Expert Comment

by:bvanderveen
ID: 11953868
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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 35

Assisted Solution

by:TimYates
TimYates earned 100 total points
ID: 11956033
> 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
 
LVL 7

Expert Comment

by:bvanderveen
ID: 11958673
>>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
 
LVL 12

Expert Comment

by:Giant2
ID: 11960727
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
 
LVL 35

Expert Comment

by:TimYates
ID: 11961065
> You can too.

Hmmm...that's brute force cracking...  not decrypting...  There is a slight (but significant) difference...
0
 

Author Comment

by:inzaghi
ID: 11962029
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
 
LVL 12

Accepted Solution

by:
Giant2 earned 300 total points
ID: 11962423
>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
 
LVL 12

Expert Comment

by:Giant2
ID: 11970432
Thanks.
:)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This video teaches viewers about errors in exception handling.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question