Solved

DES3 in java and oracle

Posted on 2004-09-01
10
364 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JavaScript/Java - Changing an image background color 4 65
replace a word with other 1 43
eclipse buid path vs tomcat lib path 10 22
Java: anonymous class 4 16
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

816 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now