Follow us on Twitter!
Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill
Friday, April 18, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 26
Guests Online: 25
Members Online: 1

Registered Members: 82828
Newest Member: uberscon
Latest Articles
View Thread

HellBound Hackers | Computer General | Cryptography

Author

DC's Cryptanalysis challenge 1


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 03-05-07 10:06
Note: This isn't a real challenge. It has no authority and will not affect your points. That said, it should be fun, and an introduction to the art of cryptanalysis.

What is cryptanalysis you ask? Besides being a cool word, it is the science/art/act of teasing the original message out of the encrypted one, or of breaking encryption.

So, without further ado, I present you with my first cryptanalysis challenge:

The following message has been encrypted using the python code I submitted to the code bank. Unfortunately, the algorithm I used only allows for 255 keys, which isn't very secure. PM me with the password included as part of the message, and I'll post a reply here saying you passed the challenge.
Encrypted message (ciphertext)
Code

m3yDv6R9lLKukpe/k5C2wK6djLuuoph6k5GYwKyijL2kopy2pI2MequRn7Gkt7bDrX2bsax8o7Gkkba4q6KcsqyNjLSrkZC+pKHCtqx8f8STkZjDr6KMeqOhf7KskrbEq6KXsaN8srKskcK2rLeutpazjJ+rkZ+xrZGQxK19rsCtt5uxq6KXsZWQfreVt6TArHyUsq2zn7WTw7WH




More will be forthcoming.



Author

RE: DC's Cryptanalysis challenge 1

richohealey
Member



Posts: 1022
Location: #!/usr/local/bin/python
Joined: 01.05.06
Rank:
Monster
Posted on 03-05-07 10:46
it's not in the code bank yet!

a ha ahha ha

and i look forward to it


bitchohealey at hotmail dot com skype:richohealey www.psych0tik.net
Author

RE: DC's Cryptanalysis challenge 1


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 03-05-07 10:54
Oops. :)
you can find and replace tab for an actual tab.
Code

#basic rot 255 base 64 encoded encryption. insecure, for demonstration purposes.
#coded by digital chameleon
import base64
def encrypt(strPlaintext,intKey):
[tab]strPlaintext=base64.b64encode(strPlaintext)
[tab]strCiphertext=''
[tab]for strLetter in strPlaintext:
[tab][tab]try:
[tab][tab][tab]strCiphertext=strCiphertext+chr(ord(strLetter)+intKey)
[tab][tab]except ValueError:
[tab][tab][tab]strCiphertext=strCiphertext+chr((ord(strLetter)+intKey)-256)
[tab]strCiphertext=base64.b64encode(strCiphertext)
[tab]print "'",strCiphertext,"'"
def decrypt(strCiphertext,intKey):
[tab]strPlaintext=''
[tab]try:
[tab][tab]strCiphertext=base64.b64decode(strCiphertext)
[tab][tab]for strLetter in strCiphertext:
[tab][tab][tab]try:
[tab][tab][tab][tab]strPlaintext=strPlaintext+chr(ord(strLetter)-intKey)
[tab][tab][tab]except ValueError:
[tab][tab][tab][tab]strPlaintext=strPlaintext+chr((ord(strLetter)-intKey)+256)
[tab][tab]strPlaintext=base64.b64decode(strPlaintext)
[tab]except TypeError:
[tab][tab]print 'not gonna happen. Wrong key?'
[tab]print "'",strPlaintext,"'"
strPlaintext=raw_input('Encrypt what message? ')
intKey=int(raw_input('Using what key (0-255))? '))
encrypt(strPlaintext,intKey)
strCiphertext=raw_input('Decrypt what message? ')
intKey=int(raw_input('Using what key (1-255))? '))
decrypt(strCiphertext,intKey)











Edited by on 03-05-07 10:55
Author

RE: DC's Cryptanalysis challenge 1


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 07-05-07 07:21
All you need to do is a brute-force attack for all keys.
Author

RE: DC's Cryptanalysis challenge 1


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 07-05-07 18:50
This was a close one. I had three submissions for this challenge yesterday, all within 20 minutes of each other.
In third place, we have richohealey at 08:08
C'mon people, we all knew richo could do this. He's a python ninja.
In second, by a hair, we have xtrmsk8r91 at 08:04
Can't say I've talked to xtrmsk8r91, but he nailed the answer, and python isn't even his first language!
And in first place, to be honored in my sig for the coming month, Nirucesis at 07:53.
An up and coming star we have here. Only a member for two days, Nirucesis managed to crack this one wide open.

Anybody who wants the second place in my sig, DC's cryptanalysis challenge #2 is still waiting for somebody to crack it, and I think you'll find it a bit harder than this one.

This challenge is open ended. If anybody wants to complete it, PM me the password and I'll post a thread here confirming it.