triple_N Posted February 2, 2021 Posted February 2, 2021 (edited) Hi @TheXman, awesome udf. But may I know how to use _CryptoNG_AES_CBC_DecryptData for 32 bytes key? If I need to use _CryptoNG_PBKDF2, I doesn't have salt and need to decrypt existing AES/CBC/NoPadding message. Here is my current code: Local $license = "D99DD3A4FAF00B9AF905CD64358C1022" Local $MESSAGE = Binary("0x"&$license&"""") Local $keystr = Binary("0X66d9130b181a3c2d72b81ba22650c9d1f118af90ad25c41d181a11da38ec35d1") Local $ivstr = Binary("0x7150bfc917037177e77984704f20730c") Local $decryptstr = _CryptoNG_AES_CBC_DecryptData($MESSAGE, $keystr,$ivstr) If @error Then MsgBox($MB_OK + $MB_ICONERROR,"ERROR: Invalid license", "ERROR: " & _CryptoNG_LastErrorMessage()) $license_result = "Fail" Exit 1 EndIf MsgBox($MB_SYSTEMMODAL, "", "decrypt: " & BinaryToString($decryptstr) ) I do read need to change the 32 bytes key to 16 bytes but not sure how, tried lot of conversion online but not get 16 char. The output from code either "Error reading or writing data" or "invalid status code C0000206". Thanks in advance for any hint. Ps: sorry wrong door just now. Thanks for your time. Edited February 11, 2021 by triple_N
TheXman Posted February 2, 2021 Author Posted February 2, 2021 (edited) Thanks Assuming that all of the information in the cryptii image is correct, the only issue I see with your script is where you are building $MESSAGE. If you change the following line, you should see the same result as cryptii. Change Local $MESSAGE = Binary("0x" & $license&"""") to Local $MESSAGE = Binary("0x" & $license) #include <Constants.au3> #include <MyIncludes\CryptoNG\CryptoNG.au3> ;<== Modify as needed example() Func example() Local $license = "D99DD3A4FAF00B8AF905CD64358C1021" Local $MESSAGE = Binary("0x" & $license) Local $keystr = Binary("0x66d9130b181a3c2d72b81ba22570c9d1f118af90ad35c41d181a11da83ec35d1") Local $ivstr = Binary("0x7140bfc917037177e77984704f20729c") Local $decryptstr = _CryptoNG_AES_CBC_DecryptData($MESSAGE, $keystr, $ivstr) If @error Then MsgBox($MB_OK + $MB_ICONERROR,"ERROR: Invalid license", "ERROR: " & _CryptoNG_LastErrorMessage()) ;$license_result = "Fail" Exit 1 EndIf MsgBox($MB_SYSTEMMODAL, "", "decrypt: " & $decryptstr) EndFunc 43 minutes ago, triple_N said: I do read need to change the 32 bytes key to 16 bytes but not sure how, I don't understand this statement. Are you saying that you are trying to decrypt data that was encrypted using AES128-CBC? Where are you getting the key & IV? If you get the right result on cryptii, then if you provide the same information to the CryptoNG functions, you should get the same result. Is that not what your are seeing? Edited February 2, 2021 by TheXman triple_N 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
triple_N Posted February 2, 2021 Posted February 2, 2021 (edited) No, I thought it's just accept 16 byte for key meanwhile my key is 32 byte. My mystery solved. Stuck there about 3 days with 3 different aes udf. Thanks a lot. Edited February 11, 2021 by triple_N
TheXman Posted February 2, 2021 Author Posted February 2, 2021 You're welcome! triple_N 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
mLipok Posted April 7, 2021 Posted April 7, 2021 (edited) @TheXman n relation to signing PDF feauture which I was asking for: For this moment I found that from begining of 2021, Chilkat provide such feature. So I will work on my Chilkat.au3 UDF to achieve this goal ( signing PDF using PADES ). Thanks for your efforts. mLipok Edited April 7, 2021 by mLipok Skysnake 1 Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
TheXman Posted April 7, 2021 Author Posted April 7, 2021 @mLipok Obviously you either have or plan to have a Chilkat Bundle License because the PDF signing methods require one. In any case, I'm glad to hear that you found a solution that works for you and that you may be adding that functionality to your Chilkat.au3 UDF library. Because your request to add PDF Signing to the CryptoNG UDF library of functions was a unique one, its priority was a very low. Meaning, I hadn't spent much time on it other than doing some initial research and adding a function to create RSA key pairs, which can be used for many other things. I appreciate you letting me know that I can remove the request from my feature request list. 😉 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
mLipok Posted April 7, 2021 Posted April 7, 2021 7 minutes ago, TheXman said: Obviously you either have or plan to have a Chilkat Bundle License because the PDF signing methods require one. In any case, I'm glad to hear that you found a solution that works for you and that you may be adding that functionality to your Chilkat.au3 UDF library. Yeah. I have license. I will share my current version of Chilkat.au3 UDF library when I end testing new feautures. Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
IanN1990 Posted April 9, 2021 Posted April 9, 2021 (edited) Hi, i have had a read through the posts and the UDFs. Am i correct that atm it is unable to encrypt / decrypt data (using RSA) using the public / private blobs it can create? #include "CryptoNG.au3" _CryptoNG_CreateRSAKeyPair(512, ".\Keys\publickey.blob", ".\Keys\privatekey.blob") $sEncryptedData = _CryptoNG_EncryptData($CNG_BCRYPT_RSA_ALGORITHM, "Test", FileRead(".\Keys\privatekey.blob")) ;$sEncryptedData = _CryptoNG_EncryptData($CNG_BCRYPT_RSAPRIVATE_BLOB, "Test", FileRead(".\Keys\privatekey.blob")) ConsoleWrite($sEncryptedData & @CRLF) ;Returns blank Edited April 9, 2021 by IanN1990
TheXman Posted April 9, 2021 Author Posted April 9, 2021 4 minutes ago, IanN1990 said: Am i correct that atm it is unable to encrypt / decrypt data (using RSA) using the public / private blobs it can create? The RSA key pairs created by the _CryptoNG_CreateRSAKeyPair() function are valid RSA key pairs and can be used by any asymmetric encryption/decryption routines that can handle RSA keys. If you are asking whether the CryptoNG UDF library currently has any functions that do asymmetric encryption or decryption, then the answer is no. As it shows in the first post, the only asymmetric functions currently in the UDF is the _CryptoNG_CreateRSAKeyPair() function. IanN1990 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
TheXman Posted April 12, 2021 Author Posted April 12, 2021 (edited) What's New in Version v1.8.0 v1.8.0 (2021-04-12) Added asymmetric (public/private key) RSA encryption/decryption functions _CryptoNG_RSA_EncryptData _CryptoNG_RSA_DecryptData Modified _CryptoNG_CreateRSAKeyPair to be able to select the export format (CryptoAPI-Compatible/LEGACY or RSA) Added create_legacy_rsa_key_pair_example to the CryptoNG_Examples.au3 file Added rsa_public_private_key_encrypt_decrypt_data_example to the example file Updated the help file to reflect the modifications above (including new constants). Thanks @IanN1990 for asking the question that lead to me to adding the asymmetric encryption/decryption functions. Edited April 16, 2021 by TheXman Rurorita, IanN1990, Musashi and 1 other 3 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
Rurorita Posted April 13, 2021 Posted April 13, 2021 Wow you did it! And you also coded it so easy to understand that i can really learn from it, as someone with no cryptography knowledge. Thanks for realizing RSA in Autoit! i was searching seemingly endlessly. Thanks man! TheXman 1 Amateur Coder - UDF's _storageS-UDF , _netcode-UDF (_netcode_Core-UDF, _netcode_AddonCore-UDF, _netcode_Proxy-UDF, _netcode_Relay-UDF, _netcode_Router-UDF)
TheXman Posted April 13, 2021 Author Posted April 13, 2021 (edited) What's New in Version v1.8.5 v1.8.5 (2021-04-13) SCRIPT-BREAKING CHANGE Changed function name from _CryptoNG_CreateRSAKeyPair to _CryptoNG_RSA_CreateKeyPair to match naming naming standards. Updated CryptoNG_Examples.au3 to reflect name change. Updated the help file to reflect name change. Edited April 13, 2021 by TheXman argumentum and IanN1990 1 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
TheXman Posted April 15, 2021 Author Posted April 15, 2021 (edited) What's New in Version v1.9.0 v1.9.0 (2021-04-15) Added wrappers for 2 new Win32 API cryptography helper functions. The new helper functions allow you to convert binary data to several text-based string formats and also allows you to convert those text-based string formats back into their binary form. For example, you can save binary public key blob files to a BASE64 format for readability or for transmission over the Internet. You can also read the BASE64 string and convert it to its binary format for use in one of the CryptoNG encryption/decryption functions. _CryptoNG_CryptBinaryToString _CryptoNG_CryptStringToBinary Updated the help file to reflect the new helper functions and their associated constants. Added examples of how to use the new helper functions to the CryptoNG_Examples.au3 file. Output examples of the new helper functions (_CryptoNG_CryptBinaryToString & _CryptoNG_CryptStringToBinary): (The output comes from the examples in the CryptoNG_Examples.au3 file.) expandcollapse popup_CryptoNG_CryptBinaryToString Examples $CNG_CRYPT_STRING_HEXRAW 525341310008000003000000000100000000000000000000010001f05cd1e7cd66ad767f408c6f3741e79f3018e521c6862fadbb2881998614836cdb8e62eb226c627c3bb4a820315f66e30f311c57fe27d01e7bbb7b1557444c53d75778761770da9c610d4b7048256a1ed55c39ca03cd8b9b8e35e735ef70fb16760375b6a5740e4f884fa549534a129a4acdfd1d43fab04717a7ece2a005353fe1f6d7a58d1ae7a2c4a544eceac76cb9e501ecacda4ba5eed1c1463f506c4629d93145b37400511a416c9976086c166684ea67bf782afbd30df0a514e15022b2378bf200391ff7ce082b337abac9b90c2d4e233c15d4d4e5637079ba449ef7adee75c6951fb2f1cc12be1dc942cbc633186ab80dc2f413b6865d89aa66b6f711 $CNG_CRYPT_STRING_HEX 52 53 41 31 00 08 00 00 03 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 01 00 01 f0 5c d1 e7 cd 66 ad 76 7f 40 8c 6f 37 41 e7 9f 30 18 e5 21 c6 86 2f ad bb 28 81 99 86 14 83 6c db 8e 62 eb 22 6c 62 7c 3b b4 a8 20 31 5f 66 e3 0f 31 1c 57 fe 27 d0 1e 7b bb 7b 15 57 44 4c 53 d7 57 78 76 17 70 da 9c 61 0d 4b 70 48 25 6a 1e d5 5c 39 ca 03 cd 8b 9b 8e 35 e7 35 ef 70 fb 16 76 03 75 b6 a5 74 0e 4f 88 4f a5 49 53 4a 12 9a 4a cd fd 1d 43 fa b0 47 17 a7 ec e2 a0 05 35 3f e1 f6 d7 a5 8d 1a e7 a2 c4 a5 44 ec ea c7 6c b9 e5 01 ec ac da 4b a5 ee d1 c1 46 3f 50 6c 46 29 d9 31 45 b3 74 00 51 1a 41 6c 99 76 08 6c 16 66 84 ea 67 bf 78 2a fb d3 0d f0 a5 14 e1 50 22 b2 37 8b f2 00 39 1f f7 ce 08 2b 33 7a ba c9 b9 0c 2d 4e 23 3c 15 d4 d4 e5 63 70 79 ba 44 9e f7 ad ee 75 c6 95 1f b2 f1 cc 12 be 1d c9 42 cb c6 33 18 6a b8 0d c2 f4 13 b6 86 5d 89 aa 66 b6 f7 11 $CNG_CRYPT_STRING_HEXASCII 52 53 41 31 00 08 00 00 03 00 00 00 00 01 00 00 RSA1............ 00 00 00 00 00 00 00 00 01 00 01 f0 5c d1 e7 cd ............\... 66 ad 76 7f 40 8c 6f 37 41 e7 9f 30 18 e5 21 c6 f.v.@.o7A..0..!. 86 2f ad bb 28 81 99 86 14 83 6c db 8e 62 eb 22 ./..(.....l..b." 6c 62 7c 3b b4 a8 20 31 5f 66 e3 0f 31 1c 57 fe lb|;.. 1_f..1.W. 27 d0 1e 7b bb 7b 15 57 44 4c 53 d7 57 78 76 17 '..{.{.WDLS.Wxv. 70 da 9c 61 0d 4b 70 48 25 6a 1e d5 5c 39 ca 03 p..a.KpH%j..\9.. cd 8b 9b 8e 35 e7 35 ef 70 fb 16 76 03 75 b6 a5 ....5.5.p..v.u.. 74 0e 4f 88 4f a5 49 53 4a 12 9a 4a cd fd 1d 43 t.O.O.ISJ..J...C fa b0 47 17 a7 ec e2 a0 05 35 3f e1 f6 d7 a5 8d ..G......5?..... 1a e7 a2 c4 a5 44 ec ea c7 6c b9 e5 01 ec ac da .....D...l...... 4b a5 ee d1 c1 46 3f 50 6c 46 29 d9 31 45 b3 74 K....F?PlF).1E.t 00 51 1a 41 6c 99 76 08 6c 16 66 84 ea 67 bf 78 .Q.Al.v.l.f..g.x 2a fb d3 0d f0 a5 14 e1 50 22 b2 37 8b f2 00 39 *.......P".7...9 1f f7 ce 08 2b 33 7a ba c9 b9 0c 2d 4e 23 3c 15 ....+3z....-N#<. d4 d4 e5 63 70 79 ba 44 9e f7 ad ee 75 c6 95 1f ...cpy.D....u... b2 f1 cc 12 be 1d c9 42 cb c6 33 18 6a b8 0d c2 .......B..3.j... f4 13 b6 86 5d 89 aa 66 b6 f7 11 ....]..f... $CNG_CRYPT_STRING_HEXASCIIADDR 0000 52 53 41 31 00 08 00 00 03 00 00 00 00 01 00 00 RSA1............ 0010 00 00 00 00 00 00 00 00 01 00 01 f0 5c d1 e7 cd ............\... 0020 66 ad 76 7f 40 8c 6f 37 41 e7 9f 30 18 e5 21 c6 f.v.@.o7A..0..!. 0030 86 2f ad bb 28 81 99 86 14 83 6c db 8e 62 eb 22 ./..(.....l..b." 0040 6c 62 7c 3b b4 a8 20 31 5f 66 e3 0f 31 1c 57 fe lb|;.. 1_f..1.W. 0050 27 d0 1e 7b bb 7b 15 57 44 4c 53 d7 57 78 76 17 '..{.{.WDLS.Wxv. 0060 70 da 9c 61 0d 4b 70 48 25 6a 1e d5 5c 39 ca 03 p..a.KpH%j..\9.. 0070 cd 8b 9b 8e 35 e7 35 ef 70 fb 16 76 03 75 b6 a5 ....5.5.p..v.u.. 0080 74 0e 4f 88 4f a5 49 53 4a 12 9a 4a cd fd 1d 43 t.O.O.ISJ..J...C 0090 fa b0 47 17 a7 ec e2 a0 05 35 3f e1 f6 d7 a5 8d ..G......5?..... 00a0 1a e7 a2 c4 a5 44 ec ea c7 6c b9 e5 01 ec ac da .....D...l...... 00b0 4b a5 ee d1 c1 46 3f 50 6c 46 29 d9 31 45 b3 74 K....F?PlF).1E.t 00c0 00 51 1a 41 6c 99 76 08 6c 16 66 84 ea 67 bf 78 .Q.Al.v.l.f..g.x 00d0 2a fb d3 0d f0 a5 14 e1 50 22 b2 37 8b f2 00 39 *.......P".7...9 00e0 1f f7 ce 08 2b 33 7a ba c9 b9 0c 2d 4e 23 3c 15 ....+3z....-N#<. 00f0 d4 d4 e5 63 70 79 ba 44 9e f7 ad ee 75 c6 95 1f ...cpy.D....u... 0100 b2 f1 cc 12 be 1d c9 42 cb c6 33 18 6a b8 0d c2 .......B..3.j... 0110 f4 13 b6 86 5d 89 aa 66 b6 f7 11 ....]..f... $CNG_CRYPT_STRING_BASE64 UlNBMQAIAAADAAAAAAEAAAAAAAAAAAAAAQAB8FzR581mrXZ/QIxvN0HnnzAY5SHG hi+tuyiBmYYUg2zbjmLrImxifDu0qCAxX2bjDzEcV/4n0B57u3sVV0RMU9dXeHYX cNqcYQ1LcEglah7VXDnKA82Lm4415zXvcPsWdgN1tqV0Dk+IT6VJU0oSmkrN/R1D +rBHF6fs4qAFNT/h9teljRrnosSlROzqx2y55QHsrNpLpe7RwUY/UGxGKdkxRbN0 AFEaQWyZdghsFmaE6me/eCr70w3wpRThUCKyN4vyADkf984IKzN6usm5DC1OIzwV 1NTlY3B5ukSe963udcaVH7LxzBK+HclCy8YzGGq4DcL0E7aGXYmqZrb3EQ== $CNG_CRYPT_STRING_BASE64 + $CNG_CRYPT_STRING_NOCRLF UlNBMQAIAAADAAAAAAEAAAAAAAAAAAAAAQAB8FzR581mrXZ/QIxvN0HnnzAY5SHGhi+tuyiBmYYUg2zbjmLrImxifDu0qCAxX2bjDzEcV/4n0B57u3sVV0RMU9dXeHYXcNqcYQ1LcEglah7VXDnKA82Lm4415zXvcPsWdgN1tqV0Dk+IT6VJU0oSmkrN/R1D+rBHF6fs4qAFNT/h9teljRrnosSlROzqx2y55QHsrNpLpe7RwUY/UGxGKdkxRbN0AFEaQWyZdghsFmaE6me/eCr70w3wpRThUCKyN4vyADkf984IKzN6usm5DC1OIzwV1NTlY3B5ukSe963udcaVH7LxzBK+HclCy8YzGGq4DcL0E7aGXYmqZrb3EQ== $CNG_CRYPT_STRING_BASE64HEADER -----BEGIN CERTIFICATE----- UlNBMQAIAAADAAAAAAEAAAAAAAAAAAAAAQAB8FzR581mrXZ/QIxvN0HnnzAY5SHG hi+tuyiBmYYUg2zbjmLrImxifDu0qCAxX2bjDzEcV/4n0B57u3sVV0RMU9dXeHYX cNqcYQ1LcEglah7VXDnKA82Lm4415zXvcPsWdgN1tqV0Dk+IT6VJU0oSmkrN/R1D +rBHF6fs4qAFNT/h9teljRrnosSlROzqx2y55QHsrNpLpe7RwUY/UGxGKdkxRbN0 AFEaQWyZdghsFmaE6me/eCr70w3wpRThUCKyN4vyADkf984IKzN6usm5DC1OIzwV 1NTlY3B5ukSe963udcaVH7LxzBK+HclCy8YzGGq4DcL0E7aGXYmqZrb3EQ== -----END CERTIFICATE----- ====================================================================== _CryptoNG_CryptStringToBinary Examples $CNG_CRYPT_STRING_HEXRAW String: 525341310008000003000000000100000000000000000000010001F05CD1E7CD66AD767F408C6F3741E79F3018E521C6862FADBB2881998614836CDB8E62EB226C627C3BB4A820315F66E30F311C57FE27D01E7BBB7B1557444C53D75778761770DA9C610D4B7048256A1ED55C39CA03CD8B9B8E35E735EF70FB16760375B6A5740E4F884FA549534A129A4ACDFD1D43FAB04717A7ECE2A005353FE1F6D7A58D1AE7A2C4A544ECEAC76CB9E501ECACDA4BA5EED1C1463F506C4629D93145B37400511A416C9976086C166684EA67BF782AFBD30DF0A514E15022B2378BF200391FF7CE082B337ABAC9B90C2D4E233C15D4D4E5637079BA449EF7ADEE75C6951FB2F1CC12BE1DC942CBC633186AB80DC2F413B6865D89AA66B6F711 Binary: 0x525341310008000003000000000100000000000000000000010001F05CD1E7CD66AD767F408C6F3741E79F3018E521C6862FADBB2881998614836CDB8E62EB226C627C3BB4A820315F66E30F311C57FE27D01E7BBB7B1557444C53D75778761770DA9C610D4B7048256A1ED55C39CA03CD8B9B8E35E735EF70FB16760375B6A5740E4F884FA549534A129A4ACDFD1D43FAB04717A7ECE2A005353FE1F6D7A58D1AE7A2C4A544ECEAC76CB9E501ECACDA4BA5EED1C1463F506C4629D93145B37400511A416C9976086C166684EA67BF782AFBD30DF0A514E15022B2378BF200391FF7CE082B337ABAC9B90C2D4E233C15D4D4E5637079BA449EF7ADEE75C6951FB2F1CC12BE1DC942CBC633186AB80DC2F413B6865D89AA66B6F711 $CNG_CRYPT_STRING_BASE64 UlNBMQAIAAADAAAAAAEAAAAAAAAAAAAAAQAB8FzR581mrXZ/QIxvN0HnnzAY5SHG hi+tuyiBmYYUg2zbjmLrImxifDu0qCAxX2bjDzEcV/4n0B57u3sVV0RMU9dXeHYX cNqcYQ1LcEglah7VXDnKA82Lm4415zXvcPsWdgN1tqV0Dk+IT6VJU0oSmkrN/R1D +rBHF6fs4qAFNT/h9teljRrnosSlROzqx2y55QHsrNpLpe7RwUY/UGxGKdkxRbN0 AFEaQWyZdghsFmaE6me/eCr70w3wpRThUCKyN4vyADkf984IKzN6usm5DC1OIzwV 1NTlY3B5ukSe963udcaVH7LxzBK+HclCy8YzGGq4DcL0E7aGXYmqZrb3EQ== Binary: 0x525341310008000003000000000100000000000000000000010001F05CD1E7CD66AD767F408C6F3741E79F3018E521C6862FADBB2881998614836CDB8E62EB226C627C3BB4A820315F66E30F311C57FE27D01E7BBB7B1557444C53D75778761770DA9C610D4B7048256A1ED55C39CA03CD8B9B8E35E735EF70FB16760375B6A5740E4F884FA549534A129A4ACDFD1D43FAB04717A7ECE2A005353FE1F6D7A58D1AE7A2C4A544ECEAC76CB9E501ECACDA4BA5EED1C1463F506C4629D93145B37400511A416C9976086C166684EA67BF782AFBD30DF0A514E15022B2378BF200391FF7CE082B337ABAC9B90C2D4E233C15D4D4E5637079BA449EF7ADEE75C6951FB2F1CC12BE1DC942CBC633186AB80DC2F413B6865D89AA66B6F711 Edited April 17, 2021 by TheXman argumentum 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
TheXman Posted June 7, 2021 Author Posted June 7, 2021 (edited) What's New in Version v1.9.1 Removed internal __CryptoNG_Startup and __CryptoNG_Shutdown functions. They were replaced with new helper functions to get & close DLL handles. __CryptoNG_GetBcryptDllHandle __CryptoNG_CloseBcryptDllHandle __CryptoNG_GetNcryptDllHandle __CryptoNG_CloseNcryptDllHandle Added a helper function to enable/disable debug messages. It is primarily for internal use. _CryptoNG_Debug Updated the help file to include the _CryptoNG_Debug function. Added a user.calltips.api file and a userudfs.properties file that includes entries for all of the public CryptoNG functions. Small changes to the ouput of a couple of the examples. Internal Changes Changed __CryptoNG_BCryptDecrypt_CBC to __CryptoNG_BCryptDecrypt_With_BlockPadding Changed __CryptoNG_BCryptEncrypt_CBC to __CryptoNG_BCryptEncrypt_With_BlockPadding Edited June 7, 2021 by TheXman argumentum 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
argumentum Posted June 7, 2021 Posted June 7, 2021 (edited) Edited June 7, 2021 by argumentum solved Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
TheXman Posted June 7, 2021 Author Posted June 7, 2021 Putting out a corrected version now. Thanks @argumentum! argumentum 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
TheXman Posted June 7, 2021 Author Posted June 7, 2021 What's New in Version v1.9.2 Fixed a typo in the DllOpen for Bcrypt.dll (Thanks Argumentum) CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
MJC Posted June 8, 2021 Posted June 8, 2021 On 4/6/2020 at 9:44 PM, TheXman said: Since there are other tools available that can easily be incorporated into an AutoIt script that will encrypt & decrypt data using AES-GCM... Which Tools ? Could you please elaborate ?
TheXman Posted June 8, 2021 Author Posted June 8, 2021 (edited) Are you asking if I can elaborate on tools that support AES-GCM? Of course I could. My question is why should I? As far as the CryptoNG UDF is concerned, all you need to know is that AES_GCM is not currently implemented. If you are looking for C libraries, .Net assemblies, or other tools that support AES-GCM, then you can search the Internet for them as easily as I can and have in the past. This topic is for discussing CryptoNG, not other tools. Edited June 8, 2021 by TheXman CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
MJC Posted June 8, 2021 Posted June 8, 2021 52 minutes ago, TheXman said: Are you asking if I can elaborate on tools that support AES-GCM? Of course I could. My question is why should I? As far as the CryptoNG UDF is concerned, all you need to know is that AES_GCM is not currently implemented. If you are looking for C libraries, .Net assemblies, or other tools that support AES-GCM, then you can search the Internet for them as easily as I can and have in the past. This topic is for discussing CryptoNG, not other tools. Thank you kindly !
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