Hi,
I'm building my own little app for remotely installing UltraVNC. I'd like to give the user the option to enter a password which I'll then encrypt and write to the ini file. Can anyone point me in the direction of documentation on how to handle the encryption?
andymac
Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc
Encrypting Passwords
Re: Encrypting Passwords
You can use VNCPWD to encrypt a plain text password, and then write it into the ultravnc.ini.
Just two notes:
1. The encrypted password inside ultravnc.ini having 2 extra characters at the end (i.e. 18 characters rather than 16), I don't know why this is required. In my test, it looks like this extra character can be anything, but w/o it the UVNCserver will consider password is not setted. So after using VNCPWD to creat a password, I append two extra zero ("00") when putting it into the ultravnc.ini
2. I don't know whether VNCPWD is a freeware /GPL/.... Check it yourself.
Just two notes:
1. The encrypted password inside ultravnc.ini having 2 extra characters at the end (i.e. 18 characters rather than 16), I don't know why this is required. In my test, it looks like this extra character can be anything, but w/o it the UVNCserver will consider password is not setted. So after using VNCPWD to creat a password, I append two extra zero ("00") when putting it into the ultravnc.ini
2. I don't know whether VNCPWD is a freeware /GPL/.... Check it yourself.
Re: Encrypting Passwords
Thanks, I've used VNCPWD before and it's a good little app. I'd like to include this functionality natively in my own app though so I don't have to rely on VNCPWD to do this for me but I haven't been able to find documentation on how the encrypted password is created.YY wrote:You can use VNCPWD to encrypt a plain text password, and then write it into the ultravnc.ini.
Re: Encrypting Passwords
I know almost nothing on programming. Sorry can't help.
Just know that the VNC password is encrypted with DES algorithm. The following are some pages regarding DES, see if you can find something useful.
DES Encryption -- http://www.tropsoft.com/strongenc/des.htm
The DES encryption algorithm -- http://www.iusmentis.com/technology/encryption/des/
DES Encryption -- http://www.gnu.org/s/libc/manual/html_n ... ption.html
DES Encryption Package -- http://www.efgh.com/software/des.htm
Just know that the VNC password is encrypted with DES algorithm. The following are some pages regarding DES, see if you can find something useful.
DES Encryption -- http://www.tropsoft.com/strongenc/des.htm
The DES encryption algorithm -- http://www.iusmentis.com/technology/encryption/des/
DES Encryption -- http://www.gnu.org/s/libc/manual/html_n ... ption.html
DES Encryption Package -- http://www.efgh.com/software/des.htm
- Rudi De Vos
- Admin & Developer
- Posts: 6863
- Joined: 2004-04-23 10:21
- Contact:
Re: Encrypting Passwords
You also can check the uvnc source code...
The encryption and writing to ini file is in the code.
The encryption and writing to ini file is in the code.
Re: Encrypting Passwords
Rudi, then what is the purpose of these two extra characters of the excrypted password?YY wrote:The encrypted password inside ultravnc.ini having 2 extra characters at the end (i.e. 18 characters rather than 16), I don't know why this is required. In my test, it looks like this extra character can be anything, but w/o it the UVNCserver will consider password is not setted.
-
- 8
- Posts: 22
- Joined: 2009-07-28 09:58
- Location: Vienna, Austria
- Contact:
Re: Encrypting Passwords
Hello guys.
You can find the encrypting method at vncviewer, vncAuth.cpp, Line 86. It does lead down to an external call to an DES encryption method: http://en.wikipedia.org/wiki/Data_Encryption_Standard
Bobby
You can find the encrypting method at vncviewer, vncAuth.cpp, Line 86. It does lead down to an external call to an DES encryption method: http://en.wikipedia.org/wiki/Data_Encryption_Standard
Bobby
- Rudi De Vos
- Admin & Developer
- Posts: 6863
- Joined: 2004-04-23 10:21
- Contact:
Re: Encrypting Passwords
The MS function that write to the ini file, auto add some checksum
code. WritePrivateProfileStruct()
[post=49774][/post]
When the data is retreived, we don't do a checksum verification
of the GetPrivateProfileStruct(), so you can add manual some extra chars.
code. WritePrivateProfileStruct()
[post=49774][/post]
When the data is retreived, we don't do a checksum verification
of the GetPrivateProfileStruct(), so you can add manual some extra chars.
Re: Encrypting Passwords
I got it now.
Thanks so much, Rudi.
Thanks so much, Rudi.