Jump to content

Autoit Math Corrupting Data


Recommended Posts

I suppose the good questions to ask would be:

  • At what line(s) do failure occur?
  • If failure occurs in a loop, does it always fail at a certain stage? (i.e. 1st iteration, 5th iteration etc.)
  • How big are the numbers getting when the failure occurs?
  • Is there a certain operation that it's failing on (addition, concatenation, etc)
feel free to add to this.
Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Link to comment
Share on other sites

I suppose the good questions to ask would be:

  • At what line(s) do failure occur?

  • If failure occurs in a loop, does it always fail at a certain stage? (i.e. 1st iteration, 5th iteration etc.)

  • How big are the numbers getting when the failure occurs?

  • Is there a certain operation that it's failing on (addition, concatenation, etc)
feel free to add to this.

$string = BinaryToString(_QuickLZ_Decompress($string))

I know what t is, and I have said it in the very first post. It is autoit messing up the math and not returning the right results, the numbers get too big and then can't be returned to their original value because of how autoit doesnt support "big numbers", then it gets junk data, and when it runs that through the decompress function, the script crashes.

Note: It fails randomly, the way it works is it does math operations with random numbers, when two or more numbers are too big in one or more of the matricies, the numbers returned during decryption are all wrong.

This causes the above problem. If you use _arraydisplay on $ar after line 60 in the encrypt function, then on $string after line 108, it will display the numerical values of each character both before and after decrypting, by doing this you can visually see the error.

I also even posted the exact lines of code that cause the problem.

for $i=1 to 5
$enc = _mMul($enc,$keys[$ran[$i+1]])
;then here we run the encrypted text (with the randomized key) through 13 more levels or random encryption
Next

[.....]

for $i=0 to $keysx[0] - 3
$string = _mMul($string, _inv($keys[$keysx[$keysx[0]-$i]]))
Next
Edited by nullschritt
Link to comment
Share on other sites

nullshritt,

I really don't have enough time to dig into your 450+kb code, nor into your multiple threads with incomplete code to run.

But what I can say is that you should clarify your request:

If you expect comments/advices about your homebrew algorithm, say so (but expose it in understandable form first). You would learn a lot doing so, even from the little I've seen.

If you have a problem with math (seems to be around the dot product), just say so and you'll get advices too.

If you have a problem with a specific operation done by AutoIt code (e.g. dot product of matrices giving unexpected result), please post the simplest standalone reproducer possible and you'll get productive answers as well.

For now, the most useful advice I can give you is to stop dreaming of making your own "secure" algorithm and use one instead of the canned solutions proven effective by the security community, both in terms of speed and strength. Everyone can come up within minutes with his/her own encryption algorithm that he can't find a way to break. That doesn't make said algorithm any more secure than ROT13.

Security and especially encryption is incredibly difficult to get right and can very easily have subtle fatal flaws (in algorithm and/or implementation) and there is a good reason why serious algorithms are deeply mathematically involved and scrutinized for years by worldwide experts. Why not use proven solutions?

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

nullshritt,

I really don't have enough time to dig into your 450+kb code, nor into your multiple threads with incomplete code to run.

But what I can say is that you should clarify your request:

If you expect comments/advices about your homebrew algorithm, say so (but expose it in understandable form first). You would learn a lot doing so, even from the little I've seen.

If you have a problem with math (seems to be around the dot product), just say so and you'll get advices too.

If you have a problem with a specific operation done by AutoIt code (e.g. dot product of matrices giving unexpected result), please post the simplest standalone reproducer possible and you'll get productive answers as well.

For now, the most useful advice I can give you is to stop dreaming of making your own "secure" algorithm and use one instead of the canned solutions proven effective by the security community, both in terms of speed and strength. Everyone can come up within minutes with his/her own encryption algorithm that he can't find a way to break. That doesn't make said algorithm any more secure than ROT13.

Security and especially encryption is incredibly difficult to get right and can very easily have subtle fatal flaws (in algorithm and/or implementation) and there is a good reason why serious algorithms are deeply mathematically involved and scrutinized for years by worldwide experts. Why not use proven solutions?

I am working to create my own algorithm, because the ones included, don't offer anywhere near the same level of encryption(and this is a matter of fact, not opinion).

This algorithm, is more secure than any included with autoit. This algorithm works (most of the time).

And the algorithms included are proven secure? You can't be serious about that.

Although I suppose since no one here knows how to help me, I will just modify my algorithm to work alongside a canned solution, and increase it's security.

Thanks anyways.

Link to comment
Share on other sites

  • Moderators

nullschritt,

And then you wonder why no-one offers to help you..... :rolleyes:

As you feel that this thread serves no useful purpose, there seems only one thing to do.....<click> { © Jos :D }

M23

P.S. Do NOT start another one - we obviously know nothing about this subject, so there is no point in asking. ;)

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...