Guest Cebooo Posted July 1, 2005 Share Posted July 1, 2005 Both.The syntax will be:FileEncrypt("filename", [method])- Default method will = 0 which will use MD5 Message-Digest Algorithm.- Binary and Text files will be supported if all goes well.StringEncrypt("string", [method])- Default method will = 0 which will use MD5 Message-Digest Algorithm.Hi,Encryption and hashing would be a really nice addition to Auto it indeed.However, these two cryptographic functions should be separated. MD5 and SHA-1 are hashing functions, whereas AES, DES, Blowfish are encryption algorithms. MD5 is a one-way encryption algorithm whereas AES encrypted data can be decrypted with the key.So, since the hashed value can not be computed back, so the String|FileDecrypt() functions you suggest would be inappropriate for hashing.I suggest you call your functions EncryptFile("filename", [method]), EncryptString("string", [method]), DecryptFile("filename", [method]), DecryptFile("string", [method]), HashFile("filename", [method]), HashString("string", [method]). Optional parameters will be required sooner or later for the encryption algorithms as many algorithms can use different key lengths.The introduction to OpenSSL presented on SecurityFocus is a good starting point on this subject http://www.securityfocus.com/infocus/1388All the best,.l. Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted July 1, 2005 Share Posted July 1, 2005 If you look at the naming syntax, the object which is affected by the command usually goes first (i.e. String* File* Obj*...) Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
JSThePatriot Posted July 3, 2005 Author Share Posted July 3, 2005 Hi,Encryption and hashing would be a really nice addition to Auto it indeed.However, these two cryptographic functions should be separated. MD5 and SHA-1 are hashing functions, whereas AES, DES, Blowfish are encryption algorithms. MD5 is a one-way encryption algorithm whereas AES encrypted data can be decrypted with the key.So, since the hashed value can not be computed back, so the String|FileDecrypt() functions you suggest would be inappropriate for hashing.I suggest you call your functions EncryptFile("filename", [method]), EncryptString("string", [method]), DecryptFile("filename", [method]), DecryptFile("string", [method]), HashFile("filename", [method]), HashString("string", [method]). Optional parameters will be required sooner or later for the encryption algorithms as many algorithms can use different key lengths.The introduction to OpenSSL presented on SecurityFocus is a good starting point on this subject http://www.securityfocus.com/infocus/1388All the best,.l.<{POST_SNAPBACK}>I appreciate you passing on this information. I am glad to see I have someone else that is interested in this.I would like to keep this as simple as possible, and adding another 2 functions I think would be a bit over complicating this.I will be using the naming conventions as stated by MSLx Fanboy.If everyone would post and give me their opinion as to whether or not I should use StringMD5() and/or FileMD5() or if I should go as I have already stated. I am willing to go majority vote on this. Please everyone let me know what you think.@Valik I have completely dropped that other system as I found the algorithm. I am just converting it to C++ and it doesnt use STL so that will be good.Thanks again to everyone for their support,JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted July 4, 2005 Share Posted July 4, 2005 I would actually suggest *Digest or *Hash for the function names... Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
JSThePatriot Posted July 4, 2005 Author Share Posted July 4, 2005 I would actually suggest *Digest or *Hash for the function names...<{POST_SNAPBACK}>Excellent. Now to get everyone else to reply. I need to know soon as I am fixing to be implementing it into the AutoIt source code.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
LxP Posted July 4, 2005 Share Posted July 4, 2005 Hi guys,Personally I don't think I'll use any encryption or decryption functions much, but I would most likely use an MD5 routine every now and then.I would prefer either MD5() over MD5Hash() over MD5Digest() because I think that they are more common terms, but any mention of MD5 would generally alert an AutoIt coder as to what the function does.Would it be necessary two define separate functions for hashing strings and files? Without knowing much about how it's done, I imagine something like; assuming that modification to fileRead() pulls through, ; i.e. fileRead($pathToFile) reads whole file $fileHash = md5(fileRead($pathToFile))should suffice, but I know nothing about the workings of MD5 and so maybe the entire file doesn't need to be in memory to determine its hash. Then, a separate function definitely would be worthwhile.(I think!) Regards,Alex Peters Link to comment Share on other sites More sharing options...
JSThePatriot Posted July 5, 2005 Author Share Posted July 5, 2005 Hi guys,Personally I don't think I'll use any encryption or decryption functions much, but I would most likely use an MD5 routine every now and then.I would prefer either MD5() over MD5Hash() over MD5Digest() because I think that they are more common terms, but any mention of MD5 would generally alert an AutoIt coder as to what the function does.Would it be necessary two define separate functions for hashing strings and files? Without knowing much about how it's done, I imagine something like; assuming that modification to fileRead() pulls through, ; i.e. fileRead($pathToFile) reads whole file $fileHash = md5(fileRead($pathToFile))should suffice, but I know nothing about the workings of MD5 and so maybe the entire file doesn't need to be in memory to determine its hash. Then, a separate function definitely would be worthwhile.(I think!) Regards,Alex Peters<{POST_SNAPBACK}>Yes just using an MD5() would I think be possible, but the way I already have it divided up why not just make it easier. Most of AutoIt's functions are self usable not needing other functions to get the desired results.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted July 5, 2005 Share Posted July 5, 2005 Just make sure that an MD5 can be taken of binary files Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
JSThePatriot Posted July 5, 2005 Author Share Posted July 5, 2005 Just make sure that an MD5 can be taken of binary files <{POST_SNAPBACK}>Most definitely. I knew there was a reason for FileMD5() function .JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
JSThePatriot Posted July 6, 2005 Author Share Posted July 6, 2005 Alright. You are due an update.I have included the FileMD5("filename") function into a compiled AutoIt, but I am having some issues.I will be getting in touch with Jon or another developer, to see if I can get my issues straightened out. I seem to be missing something, but I have looked over the source code so much I know I must be just missing it in plain sight.I will let you all know when I submit the final to Jon. Working on StringMD5("string") now so, we will see what I can get done.Again, I thank everyone for your support. I hope to have this in the beta releases coming soon...JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
layer Posted July 6, 2005 Share Posted July 6, 2005 If I were you, I'd PM it to jpm as Jon is very busy, and can't always make it to the forums or his email. And some mail programs are hard to let you to send files in emails... Glad to hear your progress is coming along good FootbaG Link to comment Share on other sites More sharing options...
JSThePatriot Posted July 6, 2005 Author Share Posted July 6, 2005 If I were you, I'd PM it to jpm as Jon is very busy, and can't always make it to the forums or his email. And some mail programs are hard to let you to send files in emails... Glad to hear your progress is coming along good <{POST_SNAPBACK}>Good idea . I have it all straightened out.I have completed the following functions...FileMD5("[i]filename[/i]") StringMD5("[i]string[/i]")The file works on binary files as well as text files. I am guessing I need to write the help file stuff for these functions. I will be in contact with JPM trying to get this included into the next beta.Thanks again for all of the support,JSP.S. Next I would like to include AES Encryption/Decryption. Though it may be a couple of weeks before I can start on it. AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
layer Posted July 6, 2005 Share Posted July 6, 2005 COOL! Can't wait. Good work FootbaG Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted July 7, 2005 Share Posted July 7, 2005 My Hero! :"> Hehe, I actually had 1 tear Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
JSThePatriot Posted July 7, 2005 Author Share Posted July 7, 2005 lol... Havent heard back from jpm yet. I will keep you posted. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
jftuga Posted July 7, 2005 Share Posted July 7, 2005 Awesome. I hope your code can get accepted into the main source tree. If you add encryption, do you have to worry about import / export restrictions? -John Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile Link to comment Share on other sites More sharing options...
layer Posted July 7, 2005 Share Posted July 7, 2005 Sorry if this has been discused, but are we doing decryption? :"> FootbaG Link to comment Share on other sites More sharing options...
JSThePatriot Posted July 7, 2005 Author Share Posted July 7, 2005 Sorry if this has been discused, but are we doing decryption? :"><{POST_SNAPBACK}>Its okay.MD5 is a One-Way Hash. It isnt to be decrypted.I am planning on getting into AES or another Encryption/Decryption that will then allow you to encrypt and then decrypt data.I may also be interested in adding atleast one other One-Way Hash to give some options.Awesome. I hope your code can get accepted into the main source tree.If you add encryption, do you have to worry about import / export restrictions?-JohnI am pretty confident that it will be included, though I may have some bugs that need to be worked out.I am not quite sure I understand your question. What about import/export would restrict an encryption function?Thanks,JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Valik Posted July 7, 2005 Share Posted July 7, 2005 I am not quite sure I understand your question. What about import/export would restrict an encryption function?Surely being the encryption aficionado you seem to be, you know that some foreign (non-US) countries have laws against some encryption/decryption algorithms. I think what jftuga is asking is are your encryption/decryption ideas going to cause any international incidents with non-US countries with laws against such things. Link to comment Share on other sites More sharing options...
JSThePatriot Posted July 7, 2005 Author Share Posted July 7, 2005 Surely being the encryption aficionado you seem to be, you know that some foreign (non-US) countries have laws against some encryption/decryption algorithms. I think what jftuga is asking is are your encryption/decryption ideas going to cause any international incidents with non-US countries with laws against such things.<{POST_SNAPBACK}>Ah you mistake my interest for encryption as my 'knowing it all'. I have never claimed that nor would I be so arrogant as to do so.I have read alot, and have never seen anything about other countries having laws against encryption methods. So another words to my knowledge MD5 is safe, but it is up to each individual to search the laws of their country. I am not responsible for someone that uses this MD5 Algorithm if they arent supposed to. Just like Jon isnt responsible for those people that use AutoIt in a negative way.Thanks for clarifying for him though. Import/Export is a computer term as well as a international term so I was unsure what he meant as I associated it immediately with computers.Now that you have brought this to my attention I will be doing more research on it.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now