Home    Training    Downloads    Tutorials    Arbitary    Get Fate    Proxy Info
 
Training session 21: Basic Encryption #2
Difficulty: Medium
Learn how Hackerpad Encryption works
Creator: m101


A while back Cyrus created a program called 'Hackerpad'. Its basic purpose was to encrypt text messages so they could be transmitted over the net. It uses a relatively simple method to encrypt the text as described below.

Every ASCII character has an integer value. This number ranges from 0 to 255, one for each typable character. Each character of the password corresponds to a diferent character in the original text. The value of the original character is added to the value of the corresponding letter in the password. This is demonstrated below:

Original Text: 123451234512345123451234
Password: 1121

123451234512345123451234 - Text
112111211121112111211121 - Password

235562445633457234662355 - Encrypted String

As you can see the encrypted string looks nothing like the original text. This is a simplified situation because hackerpad actually uses larger numbers due to the positioning of the Alphabet in the ASCII table. An example of this would be:

Original Text: THIS STRING IS BEING ENCRYPTED
Password: PASSWORD

THIS STRING IS BEING ENCRYPTED - Text
PASSWORDPASSWORDPASSWORDPASSWO - Corresponding Character

By looking at the ASCII table we see that to encrypt the first character of the string, we need to add 84 (value of T) to 80 (value of P) to give us the first character of the encrypted string. The entire process is shown below:

The ASCII Table:

int character
032 space
033 !
034 "
035 #
036 $
037 %
038 &
039 '
040 (
041 )
042 *
043 +
044 ,
045 -
046 .
047 /
048 0
049 1
050 2
051 3
052 4
053 5
054 6
055 7
056 8
057 9
058 :
059 ;
060 <
061 =
062 >
063 ?
064 @
065 A
066 B
067 C
068 D
069 E
070 F
071 G
072 H
073 I
074 J
075 K
076 L
077 M
078 N
079 O
080 P
081 Q
082 R
083 S
084 T
085 U
086 V
087 W
088 X
089 Y
090 Z
091 [
092 \
093 ]
094 ^
095 _
096 `
097 a
098 b
099 c
100 d
101 e
102 f
103 g
104 h
105 i
106 j
107 k
108 l
109 m
110 n
111 o
112 p
113 q
114 r
115 s
116 t
117 u
118 v
119 w
120 x
121 y
122 z
123 {
124 |
125 }
126 ~

Original String:
THIS STRING IS BEING ENCRYPTED
084 072 073 083 032 083 084 082 073 078 071 032 073 083 032 066 069 073 078 071 032 069 078 067 082 089 080 084 069 068

Password:
PASSWORDPASSWORDPASSWORDPASSWO
080 065 083 083 087 079 082 068 080 065 083 083 087 079 082 068 080 065 083 083 087 079 082 068 080 065 083 083 087 079

Result:
164 137 156 166 119 162 166 150 153 143 154 125 160 162 114 134 149 138 161 154 119 148 160 135 162 154 163 167 156 158

The Encrypted string is considerably diferent to the original string as you can see due to the fact that every number is roughly doubled. In this method the smallest resulting character from standard keyboard input is 64 and the largest is 252. The following is a simple program written in BASIC to encrypt a string:

--------------------------------------------------------------

REM -=Cyrus's Hackerpad Encryption Scheme=-
REM -=Cracked and Provided by m101=-

INPUT password$
INPUT text$
p = LEN(password$)
t = LEN(text$)
k = p
o = t
FOR i = 1 TO t
a$ = LEFT$(RIGHT$(text$, o), 1)
b$ = LEFT$(RIGHT$(password$, k), 1)
c$ = c$ + CHR$((ASC(a$) + ASC(b$)))
k = k - 1
IF k = 0 THEN k = p
o = o - 1
IF o = 0 THEN o = t
NEXT i
PRINT c$

--------------------------------------------------------------

As you can see the process to encrypt a message with Hackerpad encryption is very simple.
Name

URL or Email

Message