I am attempting encrypt the RDP password on Linux.
For example, "
Letmein" in a .rdp file is:
password 51

01000000D08C9DDF0115D1118C7A00C04FC297EB0100000094D93A32136D2143BB559FE029EF87D80000000008000000700073007700000003660000A80000001000000013E56ED1331197B2C0DF1C605B8A24BE0000000004800000A000000010000000DAD95D28F906E07D7CE745E6A7DB27EC08020000CFDFFF40D40F42C2F34BD13FC00F0BC62FB580FB5E74F941724046CA8BC43E07B1BB2F7A7E008AF8718CCFD88788E1C4B6AA4C0B79B9B386B628FA9A0038EEBEEE034E467B4C36D49AAEA1EE865813575E9DECFA4934C56008B048DC0A2E4C7F26EE551B3B7DD42046FCA67533B531A935E65324136FBC6E408E22E1C24A4A178F91AA802E637CFE4A502F8950165ACD480425BBB07FFF23D264A906E535B51DD167E95A108EBC8B02701FF6A5CD23858BE4EBF4ABF238675DDBE57F5B994139F250B03B8174D1D036E730C5241D64C106C3D075B3CF5DBAC6AB4069D1170E8AC35BE8039B9D83F2E1CC846F4E119DAEAC8E71A51E5C794EFEA1403AC18FBD0B478FC204D3C137DF51098FC0BEE43F504DED87628F83AFE519FA06664846FB0247A1CFD4A335EA2B8EED94C84957E5BE003ABE19239BD364CF4BB05956804901232439734094941593EFC85C8B55529EE5C532656BC21C422BB4EB446FDC44BBA342D8542DA5ADA64CBAC96346DFF4AE2CF49767E13FB330E37F3367A52EFB74FE33AA0B96D09F4F01BA1544FC6E2ABB5B6E994F65C9C3EBF7F78C84E17F67D4E1FF24C4A1C7E2FF3ED2B77CFAA98111866DBCC6B01F2D4FA66BFD30B5A538312AE549A7C7B8E6F5A9FD67632D853A8E171F1BBBB8C6FCD4AE8867F742A80398B800746434711BE18567E978133F114EAB020E18FE28398F86B4B05615140A70DA3BE6E75D40729F14000000E4734374DB595F8D942CB65A5F30A18B2443F0C00
In windows environment, we can call CryptProtectData() in crypt32.dll.
In Linux, however, there is no crypt32.dll, so it's a problem for me to encrypt the password which is also can be recognized by a remote windows OS.
I checked the source code of Protectdata.c of wine. It says that :
/*
* The Win32 CryptProtectData and CryptUnprotectData functions are meant
* to provide a mechanism for encrypting data on a machine where other users
* of the system can't be trusted. It is used in many examples as a way
* to store username and password information to the registry, but store
* it not in the clear.
*
* The encryption is symmetric, but the method is unknown. However, since
* it is keyed to the machine and the user, it is unlikely that the values
* would be portable. Since programs must first call CryptProtectData to
* get a cipher text, the underlying system doesn't have to exactly
* match the real Windows version. However, attempts have been made to
* at least try to look like the Windows version, including guesses at the
* purpose of various portions of the "opaque data blob" that is used.
*
*/
So I really wanna know that whether this algorithm provided by wine works well.
Thanks!
Best Regards!