Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Cracking DES with C++ is faster than Java?

Reply
Thread Tools

Cracking DES with C++ is faster than Java?

 
 
Julie
Guest
Posts: n/a
 
      04-25-2004
Hi,

I am going to write a program cracking DES.
One says that C++ (actually C) is faster than Java.
Is this true?
Thanks.

J
 
Reply With Quote
 
 
 
 
David Rasmussen
Guest
Posts: n/a
 
      04-25-2004
Julie wrote:
> Hi,
>
> I am going to write a program cracking DES.
> One says that C++ (actually C) is faster than Java.
> Is this true?


It depends on the implementation (i.e. the compiler), but in practice
and in general: yes.

/David
 
Reply With Quote
 
 
 
 
Douglas A. Gwyn
Guest
Posts: n/a
 
      04-25-2004
Julie wrote:
> One says that C++ (actually C) is faster than Java.


That depends on several factors,
but in general, programs coded in C will
be slightly faster than if C++ had been used
and noticeably faster than if Java were used.
However, the fastest DES crackers tend to use
some assembly language in order to exploit
available hardware instructions that are not
likely to be used in code generated by a
compiler.

Why bother to write a DES cracker when you
can obtain one that has already had a lot of
development work put into it?

 
Reply With Quote
 
Liz
Guest
Posts: n/a
 
      04-25-2004

"David Rasmussen" <(E-Mail Removed)> wrote in message
news:c6h4hm$i7j$(E-Mail Removed)-c.dk...
> Julie wrote:
> > Hi,
> >
> > I am going to write a program cracking DES.
> > One says that C++ (actually C) is faster than Java.
> > Is this true?

>
> It depends on the implementation (i.e. the compiler), but in practice
> and in general: yes.


or as they say in canada
yaaaaaaaaaaaaaaaaaaaaaaaaaaaa

>
> /David



 
Reply With Quote
 
Claudio Puviani
Guest
Posts: n/a
 
      04-25-2004
"Julie" <(E-Mail Removed)> wrote
> Hi,
>
> I am going to write a program cracking DES.
> One says that C++ (actually C) is faster than Java.
> Is this true?


At first I thought you were our resident Julie, but I see that you aren't.

The aspect of Java that's inherently slow is the management of object
creation/allocation/copying. If your DES cracker works strictly with a raw
array of bytes and your compiler generates reasonable code (some compilers,
like GNU Java, can generate native executables), there's a good possibility
that the difference in execution times could be negligible. However, if you
introduce object creation into the mix or target a JVM that has no JIT
compilation, you're just handing the victory to C++ on a silver platter.

Claudio Puviani


 
Reply With Quote
 
Jan Panteltje
Guest
Posts: n/a
 
      04-25-2004
On a sunny day (25 Apr 2004 12:37:43 -0700) it happened http://www.velocityreviews.com/forums/(E-Mail Removed)
(Julie) wrote in <(E-Mail Removed) >:

>Hi,
>
>I am going to write a program cracking DES.
>One says that C++ (actually C) is faster than Java.
>Is this true?
>Thanks.
>
>J

There are special techniques for DES, most programs
are in C and assembler.
Jave is snail like.
 
Reply With Quote
 
Jon Bell
Guest
Posts: n/a
 
      04-25-2004
In article <OXUic.20330$0u6.3390267@attbi_s03>, Liz <(E-Mail Removed)> wrote:
>
>"David Rasmussen" <(E-Mail Removed)> wrote in message
>news:c6h4hm$i7j$(E-Mail Removed)-c.dk...
>>
>> and in general: yes.

>
>or as they say in canada
>yaaaaaaaaaaaaaaaaaaaaaaaaaaaa


Eh?

--
Jon Bell <(E-Mail Removed)> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
 
Reply With Quote
 
Leor Zolman
Guest
Posts: n/a
 
      04-26-2004
On Sun, 25 Apr 2004 15:52:18 -0400, "Douglas A. Gwyn" <(E-Mail Removed)>
wrote:

>Julie wrote:
>> One says that C++ (actually C) is faster than Java.

>
>That depends on several factors,
>but in general, programs coded in C will
>be slightly faster than if C++ had been used


Why do you say that? C++ was designed so as "not to leave room for a
lower-level language" (including C), so I can't imagine how anything you
code in C would become slower as a result of adaptation to / compilation
under C++ ... unless you go from a superior C compiler to an inferior C++
compiler, of course.
-leor


>and noticeably faster than if Java were used.
>However, the fastest DES crackers tend to use
>some assembly language in order to exploit
>available hardware instructions that are not
>likely to be used in code generated by a
>compiler.
>
>Why bother to write a DES cracker when you
>can obtain one that has already had a lot of
>development work put into it?


--
Leor Zolman --- BD Software --- www.bdsoft.com
On-Site Training in C/C++, Java, Perl and Unix
C++ users: download BD Software's free STL Error Message Decryptor at:
www.bdsoft.com/tools/stlfilt.html
 
Reply With Quote
 
Tom St Denis
Guest
Posts: n/a
 
      04-26-2004
Julie wrote:
> Hi,
>
> I am going to write a program cracking DES.
> One says that C++ (actually C) is faster than Java.
> Is this true?
> Thanks.


It can be. If you don't know why you really ought to take a step back
and learn some computer science...

Tom
 
Reply With Quote
 
Paul Schlyter
Guest
Posts: n/a
 
      04-26-2004
In article <(E-Mail Removed)>,
Douglas A. Gwyn <(E-Mail Removed)> wrote:

> Julie wrote:
>
>> One says that C++ (actually C) is faster than Java.

>
> That depends on several factors, but in general, programs
> coded in C will be slightly faster than if C++ had been used
> and noticeably faster than if Java were used. However, the
> fastest DES crackers tend to use some assembly language in
> order to exploit available hardware instructions that are not
> likely to be used in code generated by a compiler.


No -- the fastest DES crackers use dedicated DES hardware, and then
it doesn't matter that much whether you use assembler or C to "talk"
to that hardware. DES as an algorithm was designed to be implemented
in hardware, and that's why software implementations of DES are so
slow. Later algorithms (e.g. AES) are usually designed to be
implemented on common microprocessors, and that's why software
implementations of these are so much faster than software
implementations of DES.

> Why bother to write a DES cracker when you can obtain one that
> has already had a lot of development work put into it?


....such as a DES hardware chip...

--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://www.stjarnhimlen.se/
http://home.tiscali.se/pausch/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cracking AD passwords on a domain controller pokhara@yahoo.com Computer Security 1 02-13-2007 02:25 PM
Re: Brute Force Cracking Failed, No Vulnerable Blocks, DVD Decrypter Martino DVD Video 8 02-01-2006 10:09 PM
Re: Help needed on a bibliography of cracking LaDDL Computer Security 1 04-30-2004 06:41 PM
Re: Help needed on a bibliography of cracking Marek Luch Computer Security 0 04-30-2004 06:41 PM
Cracking Up AK Computer Support 11 11-11-2003 06:21 PM



Advertisments