Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DES3 in java and oracle

Posted on 2004-09-01
10
Medium Priority
?
369 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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
Technology Partners: 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!

 
LVL 35

Assisted Solution

by:TimYates
TimYates earned 400 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 1200 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

730 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