Qbasicnews.com
September 21, 2019, 10:26:59 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: decrypt and win $100  (Read 17383 times)
Dio
I hold this place together
*****
Posts: 874



« on: July 30, 2006, 07:19:29 AM »

i knew that would get your attention.


using my picture encryption thing i scrambled a picture that had text in it.

here is the picture:




i'm even giving you people the source code and i still think you can't do it. and putting 100 dollars on the line.*

* i may or may not send you 100 (hundred) dollars. you must post (PM) your source to qualify for receiving the 100 dollars. however even if you do meet the criteria to win the $100, i may not send you $100. based on how cool your entry is. my judgment is arbitrary and final. contest never ends unless otherwise noted my me. by posting an entry, you acknowledge the rules above. Please ignore spelling errors and what not. look, just don't sue me!
Logged

quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Anonymous
Guest
« Reply #1 on: July 30, 2006, 11:57:06 AM »

Ur code crashes out of the box. the one where u say "yay success i got it"

edit: needed "option dynamic" at top, those arrays on top are too large to fit into the stack (internal compiler changes in newer versions of fb.)


You realize this is an irreversible encryption, right =)

edit2: program still crashes.

edit3: making it dim shared, removing option dynamic and removing those other 2 arrays makes it work. looks klike that's an fb bug, i'll report that on fb forums asap.

and btw i saw the randomize timer, but now i see it in fact is reversible. i'll try cracking it...
Logged
Anonymous
Guest
« Reply #2 on: July 30, 2006, 01:41:07 PM »

btw, if you cut this image out of a larger image you encrypted using that algo it's irreversible, so, did you? =p (brutefocre cracking prog running in background)
Logged
Anonymous
Guest
« Reply #3 on: July 30, 2006, 09:04:23 PM »

Code:
option explicit
#include "crt.bi"
const as integer sz = 161 * 11 * 4


'sub dio_DeCrypt( srcImg as any ptr, dstPtr as any ptr, seed as integer )
#macro dio_DeCrypt( srcImg, dstPtr, seed )

'  if srcImg = 0 then exit sub
   
'  static as integer imgWidth, imgHeight, i, x, y, pa, pb, rx, ry, xo, yo
'  static as integer ptr pix, imgData2
 
'  imgWidth = cptr( ushort ptr, srcImg )[0] shr 3
'  imgHeight = cptr( ushort ptr, srcImg )[1]

 
  memcpy( dstPtr + 4, srcImg + 4, ( sz ) )
'  memcpy( dstPtr + 4, srcImg + 4, ( imgWidth * imgHeight ) * len( integer ) )

  imgData2 = cptr( any ptr, VarPtr( cptr( ushort ptr, dstPtr )[2] ) )
 
  randomize seed
 
'  dim as integer pic( sz * 8 )
 
  i = 0
  for y = 0 to 11 - 1

    for x = 0 to 161 - 1

      pic( i ) = int( rnd * ( 161 - 1 ) )
      i = i + 1

      pic( i ) = int( rnd * ( 11 - 1 ) )
      i = i + 1

    next  

  next
 
  pix = varptr( imgData2[(11 * 161) - 1] )
  for y = 11 - 1 to 0 step -1
   
'    yo = (y * imgWidth)
    for x = 161 - 1 to 0 step -1
 
      i = i - 1
      ry = pic(i)

      i = i - 1
      rx = pic(i)
     
      xo = (ry * 161)+ rx
     
     
'      pa = imgData2[yo + x]
      pa = *pix
      pb = imgData2[xo]

      imgData2[xo] = pa
      *pix = pb
'      imgData2[yo + x] = pb


      pix -= 1

    next    
   
  next
 
#endmacro
'end sub


#macro check_topline( __COLOR__ )
  if j then
  for l = 0 to 160
    if lc[l] <> __COLOR__ then
      j = 0
     
      exit for
    end if
  next
end if
#endmacro

#macro check_rightline( __COLOR__ )
  if j then
  for l = 0 to 10
    if lc[m + 160] <> __COLOR__ then
      j = 0
     
      exit for
    end if
    m += 161
  next
end if
#endmacro

#macro check_bottomline( __COLOR__ )
  if j then
  for l = 0 to 160
    if lc[l + 1600] <> __COLOR__ then
      j = 0
     
      exit for
    end if
  next
  end if
#endmacro

#macro check_leftline( __COLOR__ )
  if j then
  for l = 0 to 10
    if lc[m] <> __COLOR__ then
      j = 0
     
      exit for
    end if
    m += 161
  next
end if
#endmacro

#macro check_alllines( __COLOR__ )


  check_topline( __COLOR__ )
  check_rightline( __COLOR__ )
  check_bottomline( __COLOR__ )
  check_leftline( __COLOR__ )
 

#endmacro

screen 14, 32

dim as any ptr img1, img2
dim as integer ptr lc

img1 = imagecreate( 161, 11 )
img2 = imagecreate( 161, 11 )

bload "10dollarch.bmp", img1
'bload "newimg.bmp", img1

lc = cptr( any ptr, varptr( cptr( ushort ptr, img2 )[2] ) )
dim as uinteger iii, j, k, l, m, ddd

dim as integer imgWidth, imgHeight, i, x, y, pa, pb, rx, ry, xo, yo
dim as integer ptr pix, imgData2

dim as integer pic( sz * 8 )



if command( 1 ) <> "" then
ddd = val( command( 1 ) )

end if
 


'for iii = ( 2 ^ 32 ) - 1 to 0 step -1
'for iii = 170000 to ( 2 ^ 32 ) - 1
for iii = ddd to ( 2 ^ 32 ) - 1

  dio_DeCrypt( img1, img2, iii )
 
  j = -1
  k = lc[0]
  m = 0
 
'  check_alllines( rgb( 255, 255, 255 ) )
  check_topline( k )
  k = lc[160]
  m = 0
  check_rightline( k )
  k = lc[1600]
  m = 0
  check_bottomline( k )
  k = lc[0]
  m = 0
  check_leftline( k )


'  rgb( 255, 255, 255 )
'  for l = 0 to 10
'    if lc[m] <> rgb( 255, 255, 255 ) then
'      j = 0
'      
'      exit for
'    end if
'    m += 161
'  next
  skip:
  if j = -1 then
    ? "heh: " & iii
    bsave "dioresult.bmp", img2
    sleep
   
  end if
 
  if multikey( &h2F ) then
    put( 0, 0 ), img2, pset
    locate 20
    ? iii
   
  end if
  if multikey( 1 ) then
    end
   
  end if
 
     
 
next






verdict: after about 100 million iterations between a few computers, i think it probrbaly isn't brute force crackable =|
Logged
Dio
I hold this place together
*****
Posts: 874



« Reply #4 on: July 31, 2006, 07:36:14 AM »

Quote from: "cha0s"
Ur code crashes out of the box. the one where u say "yay success i got it"

edit: needed "option dynamic" at top, those arrays on top are too large to fit into the stack (internal compiler changes in newer versions of fb.)


edit2: program still crashes.

edit3: making it dim shared, removing option dynamic and removing those other 2 arrays makes it work. looks klike that's an fb bug, i'll report that on fb forums asap.


ok. i admit. i suck at programming. Besides, i improved on the code since then.

Quote from: "cha0s"
btw, if you cut this image out of a larger image you encrypted using that algo it's irreversible, so, did you? =p (brutefocre cracking prog running in background)


don't worry. i did good   :^_^:

Quote from: "cha0s"

verdict: after about 100 million iterations between a few computers, i think it probrbaly isn't brute force crackable =|


and that image is 11X161. with plain white text. I figured you could make a program to search for letters. But can you imagine 1000X700 images that could be anything from B&W satellite photos to other shit you dont want grandma to see. And could you imagine 100 million iterations at 1000X700? And what if the FBI used the source code to try and decrypt it but I kept re-encrypting the same image a thousand times or a million times? Should they have their computer (super in orientation no doubt) go thru the same image and the same pass re-decrypting a million times to be sure? What if I changed the pass 500,000 iterations into it?


How ever, it may only work for BMPs though. JPEG compresses and screws with the pixels
Logged

quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
NovaProgramming
Been there, done that
*****
Posts: 1025



« Reply #5 on: July 31, 2006, 01:17:48 PM »

So does that mean that you can decrypt that image into whatever it's supposed to be, but you're just waiting to see if we can do it?  Because that's pretty sweet  :wtnod2:
Logged

ovaProgramming.

One night I had a dream where I was breaking balls.  The next morning, BALLSBREAKER was born.

Quote from: "Haye, Phillip J."
 Excellent.  Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
Dio
I hold this place together
*****
Posts: 874



« Reply #6 on: July 31, 2006, 03:09:23 PM »

i guess.
Logged

quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
NovaProgramming
Been there, done that
*****
Posts: 1025



« Reply #7 on: July 31, 2006, 04:44:13 PM »

hey all I know is that I couldn't program that cuz I stink at that kind of stuff.   That's why I didn't try to decrypt it.  my "skillz" are n00bish at best.  But I can still outprogram my brother who is a Computer Science major Smiley.
Logged

ovaProgramming.

One night I had a dream where I was breaking balls.  The next morning, BALLSBREAKER was born.

Quote from: "Haye, Phillip J."
 Excellent.  Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
Dio
I hold this place together
*****
Posts: 874



« Reply #8 on: July 31, 2006, 08:07:56 PM »

Quote from: "NovaProgramming"
my "skillz" are n00bish at best.  But I can still outprogram my brother who is a Computer Science major Smiley.


i would have an aneurysm trying to program "Ballsbreaker"   :wow:  :wow:  :wow:
Logged

quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
NovaProgramming
Been there, done that
*****
Posts: 1025



« Reply #9 on: August 01, 2006, 01:35:41 AM »

lol Ballsbreaker *2* should be so much better if it ever cools down outside.   I use my laptop for programming and the best atmosphere I find is either in class, while I'm supposed to be listening, or I'm in my bed with the TV on, using my lap for the laptop (ingenius, I know).  But lately, as you all know (all of you in the U.S, at least), it has been extremely hot.  It was a record-breaker here, something like 93 with a heat index of around 106... and it's northern minnesota so it's supposed to be cold Sad
Logged

ovaProgramming.

One night I had a dream where I was breaking balls.  The next morning, BALLSBREAKER was born.

Quote from: "Haye, Phillip J."
 Excellent.  Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #10 on: August 01, 2006, 03:18:44 AM »

Translate 51C to F Tongue That was the temperature yesterday at 2PM at my place.

At it doesn't go lower than 34C at night... This is like hell Tongue

EDIT: I'll do the conversions for you: 122F Max, 93.2F Min.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
NovaProgramming
Been there, done that
*****
Posts: 1025



« Reply #11 on: August 01, 2006, 04:12:19 AM »

Yeah, but Mr. President George W. Bush says that there's no such thing as global warming!  And if you can't trust your president, then who the **** can you trust?
Logged

ovaProgramming.

One night I had a dream where I was breaking balls.  The next morning, BALLSBREAKER was born.

Quote from: "Haye, Phillip J."
 Excellent.  Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
Zap
Been there, done that
*****
Posts: 1124


« Reply #12 on: August 01, 2006, 05:24:15 PM »

Our winter was a record-breaker for cold (3-4 months of hard-frozen snow, we usually get a few weeks of the shappy one), and now our summer is a record-breaker for heat  :shifty: Doesnt really get any more silly.

But then again, the "record-breaking" for heat (here) is only since 1975, so I'm not really worried...

EDIT:
Quote from: "nathan"
And it doesn't go lower than 34C at night...


Here we get 31.5C in the day and call it record-breaking  :laughing:
Logged

url=http://www.copy-pasta.com]CopyPasta[/url] - FilePasta
Deleter
Na_th_an
*****
Posts: 1292



WWW
« Reply #13 on: August 01, 2006, 10:22:30 PM »

Quote from: "NovaProgramming"
Yeah, but Mr. President George W. Bush says that there's no such thing as global warming!  And if you can't trust your president, then who the **** can you trust?


everyone else?
Logged

NovaProgramming
Been there, done that
*****
Posts: 1025



« Reply #14 on: August 02, 2006, 01:30:50 AM »

Quote from: "Deleter"
Quote from: "NovaProgramming"
Yeah, but Mr. President George W. Bush says that there's no such thing as global warming!  And if you can't trust your president, then who the **** can you trust?


everyone else?



I meant to say...

[sarcasm]"If you can't trust your president, then who the **** can you trust?" [/sarcasm]
Logged

ovaProgramming.

One night I had a dream where I was breaking balls.  The next morning, BALLSBREAKER was born.

Quote from: "Haye, Phillip J."
 Excellent.  Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!