2009-12-08

SDD64

r[0] = x[0]*x[0] ^ x[2]*x[0] ^ x[3]*x[0] ^ x[3]*x[2] ^ x[3]*x[3] ^ x[4]*x[4] ^ x[5]*x[2]
r[1] = x[2]*x[1] ^ x[3]*x[0] ^ x[3]*x[1] ^ x[3]*x[3] ^ x[4]*x[1] ^ x[4]*x[2] ^ x[5]*x[3]
r[2] = x[1]*x[0] ^ x[1]*x[1] ^ x[2]*x[0] ^ x[2]*x[2] ^ x[3]*x[0] ^ x[3]*x[2] ^ x[4]*x[0]
r[3] = x[2]*x[0] ^ x[2]*x[1] ^ x[3]*x[0] ^ x[3]*x[1] ^ x[3]*x[3] ^ x[4]*x[1] ^ x[4]*x[2]
r[4] = x[1]*x[1] ^ x[2]*x[0] ^ x[2]*x[1] ^ x[3]*x[0] ^ x[3]*x[1] ^ x[3]*x[2] ^ x[4]*x[0]
r[5] = x[2]*x[0] ^ x[2]*x[2] ^ x[3]*x[2] ^ x[3]*x[3] ^ x[4]*x[1] ^ x[4]*x[2] ^ x[4]*x[3]
r[6] = x[0]*x[0] ^ x[1]*x[0] ^ x[2]*x[1] ^ x[2]*x[2] ^ x[3]*x[0] ^ x[3]*x[1] ^ x[3]*x[2]
r[7] = x[0]*x[0] ^ x[2]*x[1] ^ x[3]*x[0] ^ x[3]*x[2] ^ x[4]*x[0] ^ x[4]*x[2] ^ x[5]*x[0]
r[8] = x[1]*x[0] ^ x[1]*x[1] ^ x[2]*x[1] ^ x[2]*x[2] ^ x[3]*x[2] ^ x[3]*x[3] ^ x[4]*x[0]
r[9] = x[1]*x[0] ^ x[1]*x[1] ^ x[2]*x[1] ^ x[3]*x[0] ^ x[3]*x[3] ^ x[4]*x[0] ^ x[4]*x[1]

WHAT:
SDD64

This is a 64-bit bit version of Giuliano Bertoletti's
DRegZ/SDDecoder license scheme.

No code lifted!

References:
"Asymmetric Cryptography with S-Boxes" - Jacques Patarin
"Algorithm for license codes" - Giuliano's sci.crypt post
"License Code Algorithms" - Giuliano's website:
http://www.webalice.it/giuliano.bertoletti/lca.html
"SDDecoder" - crackmes.de

andrewl
dec07_2009 - first release
http://andrewl.brainstemprojects.com

HOW:

Use sdd64.cpp to generate a random keypair, which are
output into public_key.h and private_key.h.

Use encoder.cpp with private_key.h to make valid licenses.

Use decoder.cpp with public_key.h check license validity.

encoder takes as input the license id (decimal format 20-bit
integer) and emits an encoded license

decoder takes as input an encoded license (hexadecimal format
64-bit integer) and emits "pass" or "fail" message

COMPILATION:

Written/tested with Visual Studio 9.0 express. With VC6,
much wincrypt stuff is not found (HCRYPTPROV, PROV_RSA_FULL,
etc. not defined). It can be made to work with VC6, but I do
not have time.

Compile sdd64.cpp alone.

Execution of sdd64 produces public_key.h and private_key.h.

Compile encoder.cpp + private_key.h.

Compile decoder.cpp + public_key.h.

Example command line:

cl sdd64.cpp /link advapi32.lib
sdd64.exe
cl encoder.cpp
cl decoder.cpp

WHERE:

Browse my website for the currently updated file archive and
text search for "sdd64".

An early version of the software is also included with the
SDDecoder Jr. v2 crackme on http://crackmes.de.

No comments:

Post a Comment

thanks for commenting!