mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Miscellaneous Math (https://www.mersenneforum.org/forumdisplay.php?f=56)
-   -   Bruteforcing 3des support!! (https://www.mersenneforum.org/showthread.php?t=19343)

t3st3r10 2014-05-09 14:04

Bruteforcing 3des support!!
 
Hi guys

not shure if this is the correct forum for this but i am planning to do something here.. it might be easier then factoring big RSA numbers i don´t know.

here is my ideia

i had a 3des tool for 3des encryption, and this tool had a 3deskey hardcoded on it.

so i used it to encrypt 128bits of data, by simply inputting 128bits data, and encrypting this data with 3des 128bits tool using the hardcoded 128bits 3des encryption key stored on tool.

my main problem is that unfortunatelly i had to format the machine and lost my tool and sources, so now i don´t have the 3des hardcoded key to decrypt the encrypted 128bits data used.

but in return i do have the 128bits encrypted data and the 128bits plain decrypted data.


so i am thinking if its possible to create a bruteforce tool using the 2 seeds 128bits data keys the plain key decrypted, and the 3des encrypted data.

So i would need to use the 3des decryption ECB method.

using as reference the = 128bits plain key to be checked as final result key.

use the 3des encrypted 128bits data as the data input to be decrypted.

then use a bruteforce mechanism 3des decryption ECB using as seeds keys from :

key 3des test decrypt key1= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

so if 3des test key1 decrypt sucessfull and result equals to 128bits plain key, save 3desdecrypt key and finish execution.

if 3des testkey decrypt fail, move on to 2nd key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 and so on all the way up to last key FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF.

So my question now is this doable

i have made some maths figures and it looks like we have here 6,568408355712891e+18 different possible combinations for a 3DES key

So i am wondering if this is a doable project and whar sort of time could this take to estimate a 3des decrypt key.

R.D. Silverman 2014-05-09 15:46

[QUOTE=t3st3r10;373029]Hi guys

not shure if this is the correct forum for this but i am planning to do something here.. it might be easier then factoring big RSA numbers i don´t know.

[/QUOTE]

Golly. You don't know. So what compels you to post here? Do you
have a strong desire to exhibit ignorance to the world?

Ignorance is curable. Except perhaps for the willful ignorance that you
exhibit. Why don't you try <gasp!> DOING SOME BACKGROUND READING?



You are not sure if this is the correct forum? Can you READ?
What is the name of this forum? Why do you post your off-topic drivel here?

[QUOTE]


here is my ideia

i had a 3des tool for 3des encryption, and this tool had a 3deskey hardcoded on it.

so i used it to encrypt 128bits of data, by simply inputting 128bits data, and encrypting this data with 3des 128bits tool using the hardcoded 128bits 3des encryption key stored on tool.

my main problem is that unfortunatelly i had to format the machine and lost my tool and sources, so now i don´t have the 3des hardcoded key to decrypt the encrypted 128bits data used.

but in return i do have the 128bits encrypted data and the 128bits plain decrypted data.


so i am thinking if its possible to create a bruteforce tool using the 2 seeds 128bits data keys the plain key decrypted, and the 3des encrypted data.
[/QUOTE]

You are joking right? You don't know if it is possible to create a brute
force tool? Have you ever heard of <gasp!> writing a computer program???

[QUOTE]
So my question now is this doable

i have made some maths figures and it looks like we have here 6,568408355712891e+18 different possible combinations for a 3DES key
[/QUOTE]

Wrong. Care to try again? Do you even have a clue as to how many bits
are in a 3DES key?? If you don't then WHY DIDN'T YOU LOOK IT UP?
If you did, then WHY CAN'T YOU DO BASIC ARITHMETIC?

[QUOTE]
So i am wondering if this is a doable project and whar sort of time could this take to estimate a 3des decrypt key.[/QUOTE]

Can someone really be this stupid as to be unable to estimate the time
needed to brute force a 3DES key??? It is pre-secondary school arithmetic.

Mini-Geek 2014-05-09 15:48

No, it doesn't [URL="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.119.1761&rep=rep1&type=pdf"]appear that 3DES[/URL] (assuming it was implemented right and used [URL="https://en.wikipedia.org/wiki/Triple_DES#Keying_options"]keyring option[/URL] 1 or 2) is practically vulnerable to either a known-plaintext or a brute force attack.

If it were vulnerable to either of these, it would not be a very secure encryption scheme.

Time estimate: [URL="https://hashcat.net/forum/thread-2803.html"][B]way too long[/B][/URL].

You'd have better luck trying to recover the key from your formatted hard drive, especially if the data hasn't already been overwritten.

R.D. Silverman 2014-05-09 15:51

[QUOTE=Mini-Geek;373043]No, it doesn't [URL="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.119.1761&rep=rep1&type=pdf"]appear that 3DES[/URL] (assuming it was implemented right and used [URL="https://en.wikipedia.org/wiki/Triple_DES#Keying_options"]keyring option[/URL] 1 or 2) is practically vulnerable to either a known-plaintext or a brute force attack.

If it were vulnerable to either of these, it would not be a very secure encryption scheme.[/QUOTE]

Nowhere in the original post will you find the word "practical".

retina 2014-05-09 15:58

[QUOTE=t3st3r10;373029]So my question now is this doable[/QUOTE]Yes it is.[QUOTE=t3st3r10;373029]So i am wondering if this is a doable project and wha[t] sort of time could this take to estimate a 3des decrypt key.[/QUOTE]Let's see. The time is long. Really long. You just won’t believe how vastly, hugely, mind boggling long it is. I mean you may think it takes a long time to walk down the road to the chemist's, but that is just peanuts compared to how long this will take ...

[size=1][color=grey]With apologies to Douglas Adams[/color][/size]

R.D. Silverman 2014-05-09 16:05

[QUOTE=retina;373045]Yes it is.Let's see. The time is long. Really long. You just won’t believe how vastly, hugely, mind boggling long it is. I mean you may think it takes a long time to walk down the road to the chemist's, but that is just peanuts compared to how long this will take ...

[size=1][color=grey]With apologies to Douglas Adams[/color][/size][/QUOTE]

Is the OP really so totally stupid that he/she can't estimate how long it will
take?

Hint:

(1) How many possible keys are there?
(2) How long does it take to do one encryption?
(3) DIVIDE!

Is he/she too <blanking> lazy to investigate the answer to (1)?????
Hint: GOOGLE.

If he/she can't estimate (2) is he/she so totally lazy and unmotivated that
he/she can't write code to do it then perform <gasp!> a benchmark????

jyb 2014-05-09 19:31

[QUOTE=R.D. Silverman;373048]Is the OP really so totally stupid that he/she can't estimate how long it will
take?

Hint:

(1) How many possible keys are there?
(2) How long does it take to do one encryption?
(3) [STRIKE]DIVIDE![/STRIKE] MULTIPLY!

[/QUOTE]

FTFY :lol:

R.D. Silverman 2014-05-09 20:09

[QUOTE=jyb;373083]FTFY :lol:[/QUOTE]

Depends whether (2) is expressed as a rate (so many per second) or as
time per encryption.

VBCurtis 2014-05-09 21:51

[QUOTE=R.D. Silverman;373084]Depends whether (2) is expressed as a rate (so many per second) or as
time per encryption.[/QUOTE]

Well, you phrased it as "how long does it take?". When someone asks me how long it takes to get to my house, I do not reply with "you can do it three times in one hour."

R.D. Silverman 2014-05-09 22:30

[QUOTE=VBCurtis;373091]Well, you phrased it as "how long does it take?". When someone asks me how long it takes to get to my house, I do not reply with "you can do it three times in one hour."[/QUOTE]

If one reads crypto related publications one will find that speed of
encryption is most commonly expressed in terms of bandwidth, e.g.
GB/sec rather than sec/byte or sec/block. The latter is quite rare.

jyb 2014-05-09 23:22

[QUOTE=R.D. Silverman;373094]If one reads crypto related publications one will find that speed of
encryption is most commonly expressed in terms of bandwidth, e.g.
GB/sec rather than sec/byte or sec/block. The latter is quite rare.[/QUOTE]

Of course it's rare. Nonetheless, that's how you expressed it. The answer to "How long does it take to do one encryption?" is quite unequivocally an amount of time. Why not just acknowledge the completely inconsequential (though amusing, given the context) mistake, rather than trying to pretend it was somehow correct?

LaurV 2014-05-10 00:42

@OP: You should ignore the small fighting and arguing here around, and don't get upset by it, or fooled by it. People here they know what they are talking about. RDS is our expert in cryptography, and if he says it is not possible, than it is not. For the "machine" you talk about, even if you used the weakest key option for it, you still have to deal with about 1.2*10^24 combinations (about 80 bits, or 2^80, using some [URL="http://en.wikipedia.org/wiki/Meet-in-the-middle_attack"]MITM scheme[/URL]). Even with a lot of computing power, you will get older, your children will get older, and your grandchildren will get older, before finishing.

R.D. Silverman 2014-05-10 12:43

[QUOTE=jyb;373096]Of course it's rare. Nonetheless, that's how you expressed it. The answer to "How long does it take to do one encryption?" is quite unequivocally an amount of time. Why not just acknowledge the completely inconsequential (though amusing, given the context) mistake, rather than trying to pretend it was somehow correct?[/QUOTE]

I choose my words carefully. I said "One encryption", not "one block".
And I am very well aware of the difference for a BLOCK ALGORITHM SUCH AS 3DES.

The former depends on the
length of the plaintext. The time to do an encryption is therefore a variable
dependent on plaintext length.

jasonp 2014-05-10 12:51

OP,

Modern cryptography is not a simple thing to break like it is in movies. If one random guy on the internet could guess a 3DES key by trying all the possible keys, why would anyone use 3DES?

R.D. Silverman 2014-05-10 12:53

[QUOTE=LaurV;373106]@OP: You should ignore the small fighting and arguing here around, and don't get upset by it, or fooled by it. People here they know what they are talking about. RDS is our expert in cryptography, and if he says it is not possible, than it is not.
[/QUOTE]

Read what I said. Where did I say that it is not possible?
I was excoriating the OP for posting something totally off-topic
and for failing to do even the most basic reading about the subject
before spewing ignorance.

[QUOTE]
For the "machine" you talk about, even if you used the weakest key option for it, you still have to deal with about 1.2*10^24 combinations (about 80 bits, or 2^80, using some [URL="http://en.wikipedia.org/wiki/Meet-in-the-middle_attack"]MITM scheme[/URL]). Even with a lot of computing power, you will get older, your children will get older, and your grandchildren will get older, before finishing.[/QUOTE]

More ignorance. You did not even read the Wiki article that you quote.
A MITM attack on 3DES does NOT require 2^80 time complexity.
In fact, the article gives an explicit estimate for 3DES. Note also
that MITM attacks have MASSIVE space requirements.

Brute force attacks on block ciphers are CERTAINLY possible.
They are just not PRACTICAL.

t3st3r10 2014-05-13 02:12

[QUOTE=R.D. Silverman;373128]I choose my words carefully. I said "One encryption", not "one block".
And I am very well aware of the difference for a BLOCK ALGORITHM SUCH AS 3DES.

The former depends on the
length of the plaintext. The time to do an encryption is therefore a variable
dependent on plaintext length.[/QUOTE]


Hi

R.D Silverman

Sorry to insult your Einstein brain mate, unfortunatelly not all of us probably spent the time in maths that we were required, or perhaps i speak for my self i don´t have a freeking clue about 3DES,

and yes i did google searches it would take around 2billion years to brute force.

ok i know

my plaintext is 128bits long / 16 byte hexadecimal plainhex information

so i have

for 1 byte 256 combinations from 00 to FF, ok i know its triple des so its encrypted K1K2 dividing the 112bits key into 2 64 bits keys, as i know the hardware and software that was used and due to its CPU and software limits, and taking huge amounts of time encrypt and decrypt, the tool had to use the following encryption method using 2 keys of 64bits


i have the plainkey 16 bytes
i have the encrypted 16 byte key

all i am missing is the chipering key 3des used to encrypt data and decrypt.

so i thought how many milliseconds will a normal 3des ecb decrypt aplication take to decrypt a 128bits key using a correct 3des decrypt key+encrypted content also 128bits size.

ok also for a fact

i know the first byte of the key does not use hexadecimal FF so that should reduce sometime...

As it takes an average of 250 to 400ms to decrypt 1 message using 3DES algorithm so i can make maximum 2 to 4 attemps per second...i would need around 4billion pcs, around the scope to get som real testing done in a lifetime...

Anyways i understand the bruteforce is undoable due to the amount of time required..


PS- whats amazing here is a place full of Eisteins here, and my post was still checked by another Einstein before was submitted into the open wide forum, as it was stated that my post would be submitted for clearance after a checkup by one of the mods, aparently he also does not have a clue and he allowed my post to be posted..

LaurV 2014-05-13 03:11

[QUOTE=R.D. Silverman;373131]You did not even read the Wiki article that you quote.[/QUOTE]
Busted! That is true, I don't usually read the things I link to. The links are not for myself, but for the guys who want to read more. Once I linked to something, I know - at least vague - about the existence of that something. I just happened to know that the 3des can be attacked with MITM, and the complexity of it is close to 2^80. You can think about why is so...

And don't tell me you read all the articles you link to, before you release the posts :shock:

(at least, your boosting was good, because I went back to the article and read it, thanks!) :razz:

Xyzzy 2014-05-13 03:27

[QUOTE]…and my post was still checked by another Einstein before was submitted into the open wide forum, as it was stated that my post would be submitted for clearance after a checkup by one of the mods, aparently he also does not have a clue and he allowed my post to be posted.[/QUOTE]Please do not equate post approval with that moderator agreeing that your post has merit.

The moderation queue is there just to block spammers and bots.

We think most moderators take a laissez-faire approach to the content they allow into the forum. How else can you explain the mysterious wonders of the [URL="http://www.mersenneforum.org/forumdisplay.php?f=56"]Miscellaneous Math[/URL] sub-forum?

:ttu:

Batalov 2014-05-13 03:43

...and moving to Misc.Math
 
Vee ah not heeah to suppress free sprache, ja?
:offensive:

R.D. Silverman 2014-05-13 10:46

[QUOTE=t3st3r10;373319]Hi

R.D Silverman

Sorry to insult your Einstein brain mate, unfortunatelly not all of us probably spent the time in maths that we were required, or perhaps i speak for my self i don´t have a freeking clue about 3DES,
[/QUOTE]

Mature, intelligent people do not prattle about subjects that they
do not understand and have not studied.

If you know nothing about this subject, then it is reasonable to ask:

What compels you to post?

<plonk>

R.D. Silverman 2014-05-13 10:49

[QUOTE=LaurV;373322]Busted! That is true, I don't usually read the things I link to. The links are not for myself, but for the guys who want to read more. Once I linked to something, I know - at least vague - about the existence of that something. I just happened to know that the 3des can be attacked with MITM, and the complexity of it is close to 2^80. You can think about why is so...
[/QUOTE]

You STILL haven't read the article you quoted and you STILL are ignorant
about this subject. The complexity is not "close to 2^80" except in the
vague mathematical sense that any finite number can be approximated by any other finite number. The complexity is much higher than 2^80.

ewmayer 2014-05-14 00:40

[QUOTE=Batalov;373327]Vee ah not heeah to suppress free sprache, ja?
:offensive:[/QUOTE]

Ja -, I mean nein, vee ahh nicht da to engage in die Sprachfreiheitsunterdrückung, or in any uzzer achtundzwanzig-Buchstaben-long bad sings. Every contributor ist völlig frei to be as big of a Trottel, Dummkopf oder Vorchußlorbeereneinsammler [dang, I love engaging in profligate German-compound-nounery] as he vishes.

CRGreathouse 2014-05-14 19:12

[QUOTE=t3st3r10;373319]for 1 byte 256 combinations from 00 to FF, ok i know its triple des so its encrypted K1K2 dividing the 112bits key into 2 64 bits keys, as i know the hardware and software that was used and due to its CPU and software limits, and taking huge amounts of time encrypt and decrypt, the tool had to use the following encryption method using 2 keys of 64bits[/QUOTE]

If I understand correctly you're saying it's keyring 2 encrypted -- only two keys rather than 3. It's actually better than the 64+64 = 128 bits you'd expect, since DES was weakened to an effective 56 bits leaving you with just 112 bits of effective key to search. At one decryption per cycle it would take about 2^112 / 3e9 seconds or about 5 * 10^16 years to search the keyspace. But if you apply all the computing power on Earth that should give you another factor of 10^10 or so, reducing the time to maybe 5 million years.

bsquared 2014-05-14 19:46

[QUOTE=CRGreathouse;373461]If I understand correctly you're saying it's keyring 2 encrypted -- only two keys rather than 3. It's actually better than the 64+64 = 128 bits you'd expect, since DES was weakened to an effective 56 bits leaving you with just 112 bits of effective key to search. At one decryption per cycle it would take about 2^112 / 3e9 seconds or about 5 * 10^16 years to search the keyspace. But if you apply all the computing power on Earth that should give you another factor of 10^10 or so, reducing the time to maybe 5 million years.[/QUOTE]

Ah, but that's assuming you take the world's current stockpile of computers and plug then in in a corner somewhere and let them go. Future generations would be able to use their equipment for other things, like looking at pictures of cats or getting into arguments with strangers on the internet.

If instead we apply the entire world's computational infrastructure here and from now on to the task of recovering this key, we could do it in a few hundred years, depending on assumptions about how fast the world's computational infrastructure doubles in capability.

And if we put aside our petty human squabbles and dedicate the world's GDP to the task of building ever better computers and immediately harnessing them to this task, we could maybe have this key cracked within his lifetime!

CRGreathouse 2014-05-14 20:25

[QUOTE=bsquared;373464]Ah, but that's assuming you take the world's current stockpile of computers and plug then in in a corner somewhere and let them go. Future generations would be able to use their equipment for other things, like looking at pictures of cats or getting into arguments with strangers on the internet.

If instead we apply the entire world's computational infrastructure here and from now on to the task of recovering this key, we could do it in a few hundred years, depending on assumptions about how fast the world's computational infrastructure doubles in capability.[/QUOTE]

Yes, I'm assuming that we take the current world stock and run only this task, but don't devote new resources (other than electricity, etc.) to the task.

[QUOTE=bsquared;373464]And if we put aside our petty human squabbles and dedicate the world's GDP to the task of building ever better computers and immediately harnessing them to this task, we could maybe have this key cracked within his lifetime![/QUOTE]

I think we could definitely crack this within a lifetime, but probably not by building better computers alone. I think improvements in theory would have to carry to bulk of the weight, with software improvements and hardware advances making up the balance. Well, and maybe we could get another 2-3 orders of magnitude by overhauling the world economy to focus on building computing devices.


All times are UTC. The time now is 22:03.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.