I am looking for some feedback on the security of an encryption method I am working on. Overall, what I want to know is, with only the complied code and the output text, how easy would the method be to crack. I also appreishate any feedback as to how to improve the code.
Below is the code which I am using to generate the encryption table. This code is run every 1 to 5 characters, determined, semi-randomly, by the password. Each passVal is used for only one of these sets, after which the code is changed, using the default psuedo-random number generator.
VB Code:
Private Sub GenerateKey(passVal) Dim X&, Y&, Repeat As Boolean Rnd -1 Randomize passVal For X = 0 To 255 EncryptionOutput(X) = "" Next X For X = 0 To 15 EncryptionOutput(X) = String(17, Chr(1)) & Chr(X) Next X For X = 16 To 255 Do Repeat = False EncryptionOutput(X) = "" For Y = 1 To 18 EncryptionOutput(X) = EncryptionOutput(X) & Chr(Int((255 - 32 + 1) * Rnd + 32)) Next Y For Y = 0 To 255 If Y <> X Then If EncryptionOutput(X) = EncryptionOutput(Y) Then Repeat = True Exit For End If If Len(EncryptionOutput(Y)) = 0 Then Exit For End If End If Next Y Loop While Repeat Next X End Sub
The passVal sent to the routine is gnerated with the code:
and the number of characters to go without changing the passVal is:VB Code:
(4294836225# - 0 + 1) * Rnd
.VB Code:
CLng(5 * Rnd + 1)
An example code generated is:
which was generated from the input of:_|ýexA†^'ÒmqÊígºc
¾Z/Iwœvå*7ORnï*-4Q¾Z/Iwœvå*7ORnï*-4Q
L°k;tO£Ê™ÃXldD#?ê®L°k;tO£Ê™ÃXldD#?ê®L°k;tO£Ê™ÃXldD#?ê®
K3ŽTÕ]U‡æ$k€ˆ4öcáK3ŽTÕ]U‡æ$k€ˆ4öcáK3ŽTÕ]U‡æ$k€ˆ4öcá¸â°Uæ9«„2\;_ÛŽY¾e5
N8$¥ÐD@.@-Î|¢›@,¶N8$¥ÐD@.@-Î|¢›@,¶N8$¥ÐD@.@-Î|¢›@,¶N8$¥ÐD@.@-Î|¢›@,¶nà·AAgÿiƒLk*Я×%o÷
LRàÇæ’MrpnEdc‘þBÿðLRàÇæ’MrpnEdc‘þBÿðLRàÇæ’MrpnEdc‘þBÿðgKúqIK}ï0'¬t� �a{©’ÂgKúqIK}ï0'¬tÄa{©’ÂgKúqIK}ï0'¬tÄa{©’Â
'bëÔ7¸PÎËNn„ɉ;€Q'bëÔ7¸PÎËNn„ɉ;€Q'bëÔ7¸PÎËNn„ɉ;€Q'bëÔ7 ¸PÎËNn„ɉ;€QüQÝæJ„àþ½³M_3þ ÂÍüQÝæJ„àþ½³M_3þ ÂÍU©LTð䨯(Ö\ŽUL}u×ú
U©LTð䨯(Ö\ŽUL}u×úU©LTð䨯(Ö\ŽUL}u×úU©LTð䨯(Ö\ŽUL}u×ú²Íÿµ ÒVÊ-g!Ä«€ Ú²Íÿµ ÒVÊ-g!Ä«€ Ú²Íÿµ ÒVÊ-g!Ä«€ Ú0Åéè°*¸„ŸrH&ÛÒ†Ð+ì0Åéè°*¸„ŸrH&ÛÒ†Ð+ì
wwC‡í颢®ÈXC|C4ÁÁŽwwC‡í颢®ÈXC|C4ÁÁŽwwC‡í颢®ÈXC|C4ÁÁŽwwC‡íé¢� �®ÈXC|C4ÁÁަ#ño!þ?ž? Å&R:óEÛ¦#ño!þ?ž? Å&R:óEÛ¦#ño!þ?ž? Å&R:óEÛ¤t}'GRiJ_{‘Ä´‘Êž³_¤t}'GRiJ_{‘Ä´‘Êž³_
ÃþŒ:0-TWËÿ¯ªE”;XZ’ÃþŒ:0-TWËÿ¯ªE”;XZ’ÃþŒ:0-TWËÿ¯ªE”;XZ’ÃþŒ:0-TWËÿ¯ªE”;XZ’ÃþŒ:0-TWËÿ¯ªE”;XZ’›pèl*O˜*YÞ6I¦Ñ¡4<Ä›pèl*O˜*YÞ6I¦Ñ¡4<Ä›pèl*O˜*YÞ6I¦Ñ¡4<� �›pèl*O˜*YÞ6I¦Ñ¡4<Ä›pèl*O˜*YÞ6I¦Ñ¡4<Ä
0
00
000
0000
00000
000000
0000000
00000000
000000000
0000000000
Thanks in advance for any feedback or suggested improvements.




Reply With Quote