# Archive for April 2011

## Cracking The Vigenere Cipher

I wanted to use Vigenere as the cipher for the 3rd message on the competition to win a domain name, but changed my mind due to the number of online tools that might help decode this cipher easily even if you know nothing about how Vigenere works.

Before you start reading about how deciphering Veginere works, I invite you to take a look how Vigenere is used to cipher messages from the Wikipedia article here. In fact, Vigenere was called “le chiffre indéchiffrable” or the undecipherable cipher, because any means of cryptanalysis invented before it was defeated, till Charles Babbage found a clever, very clever, way to crack it.

After finishing reading the Code Book the last week, I started decoding the different enigmas proposed at the end of the book; and yesterday I started deciphering the 4th enigma which is a Vigenere cipher (that I finished yesterday too), and I find it pretty amazing for starters to try. I must mention that this short article will contain the solution to the enigma.

I chose to go old way while deciphering this, finding the key by hand, then decoding the message step by step.

## 0. The message to decode :

K Q O W E F V J P U J U U N U K G L M E K J I
N M W U X F Q M K J B G W R L F N F G H U D W
U U M B S V L P S N C M U E K Q C T E S W R E
E K O Y S S I W C T U A X Y O T A P X P L W P
...

The complete message can be found here.

## 1. Finding the key length:

Babbage’s method for finding the key length was that the repeated text in the ciphered message is probably produced from the same repeated letters from the clear message and which are ciphered with the same part of the key. Hence, finding an estimate between the repeated series of letters in the ciphered message would give us a good hint about the length of the key.

Clear : T H I S I S A C L E A R T E X T T H I S C A N B E E A S L Y D E C
Key :   C O D E C O D E C O D E C O D E C O D E C O D E C O D E C O D E C
Crypt : V V L W K G D G N S D V V S A X V V L W E O Q F G S D W N M G I E

As you can see the series of letters T, H, I is ciphered to the same series V, V, L, because they were situated at the same relative position according the key; notice also that E, A is ciphered to the same S, D.
The key length is at worst the spacing between these repetitions in the ciphered text, and usually it is the greatest common divisor of the spacing of (most) the repetitions (why? give it a second thought.).

Posted in , |

## Win a Free Domain Name (Registered For 3 Years), 2nd Message

By decrypting the message and following the rules you reveal, or just have fun!

After decrypting the first one, you won’t find any difficulty decrypting this one.

Hint: Phonemic, Linear, starting from the end is a good idea sometimes.

Hint 2 : This was a widely used code (language) in the past.

(if you decode the message, don’t forget to send your answer from the “contact me” page along with your email).

Decoded by : @oh_la_love, @27_hope, @mowahed23 , Mohieddine Abd-kader, @zirconias (competition always open closed).

Winner : Mohieddine Abd-kader, http://mitgux.com/

Posted in |

## Win a Free Domain Name (Registered For 3 Years)

By decrypting the message and following the rules you reveal, or just have fun!

Hint : People used to love playing Angry Birds in ancient Rome.

Decoded by : @oh_la_love, @27_hope, @mowahed23, Mohieddine Abd-kader, @zirconias (competition always open closed).

Winner : Mohieddine Abd-kader, http://mitgux.com/

Posted in |

## WP7 Samsung Devices Unlocked Forever?

Update :

No they are not ;), You can use Heathcliff74's tool from XDA here to gain root access to the Registry and change whatever you want

Most of the WP7 users who unlocked their devices using the ChevronWP7 tool have applied a registry hack to prevent their devices from relocking again, something that I applied myself, but had never thought it would unlock the device forever (till now at least).

For HTC users, they can use provxml to do this, and the Samsung users have the ability to do the same with a little app that can be found here.

The hack is pretty simple actually, it just clears the URLs the phone uses to ring back Microsoft and asks if it should be unlocked or not, there URLs can be found in the Registry at this location :
`   1: [HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]`
`   2: "PortalUrlProd"="https://developerservices.windowsphone.com/Services/WindowsPhoneRegistration.svc/01/2010"`
`   3:  `
`   4: PortalUrlInt"="https://developerservices.windowsphone-int.com/Services/WindowsPhoneRegistration.svc/01/2010"`
By setting these two values to null (a void string), the phone will never be able to synchronize with Microsoft servers and hence won’t relock again.

Now if you want  to relock your phone again for whatever reason, with HTC device it is just applying a provxml that will revert the process and insert the URLs back, but on Samsung devices it is not that easy.

Writing on Samsung registry (take a look at my previous post about this) is done using the CHybridClass_FCRProxy class that comes with the native Samsung DLL FCRouterProxy.dll (this DLL has access to some privileged Registry keys).

To write a value on the registry, you basically call something like this :

`   1: Samsung.RegistryWrite(Samsung.RegistryKey.LocalMachine, @"Software\Microsoft\DeviceReg", "PortalUrlProd", "VALUE HERE");`

Strangely, the native Samsung methods don’t allow writing values that are more than 30 characters length, which makes it impossible to write back the original URLs that point to Microsoft servers.

So if a Samsung user locks its phone after this, he will never be able to unlock it again even with a valid developer account (just happened to me).

Heathcliff74 over XDA forums has promised me that his future Registry utility for Samsung devices will have root access, so let’s hope it will come soon. Another solution would be putting a less than 30 chars url that redirects to 127.0.0.1 or https://developerservices.windowsphone.com something I didn’t try (won’t risk yet) and that would require more work (domain certificates?…)

Posted in , , |

Swedish Greys - a WordPress theme from Nordic Themepark. Converted by LiteThemes.com.