VOGONS

Common searches


First post, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

I am trying to figure out how Windows 3.11 encodes screen saver passwords. As far as I can tell a string of plain text characters of the same length as the password is stored in Control.ini like this:

password = "Peter"

[ScreenSaver]
Password=x(m9|

password = "Peter Swinkels"

[ScreenSaver]
Password=zvG-/Svh?v8s6z

It appears the length of the password or successive characters affect the encoding. Does anyone know what DLL and what functions are used to encode and decode passwords? (if any) Oddly enough, it seems each screen saver supporting a password (*.scr files) contains the GUI information defining the password settings dialog in the control panel. They contain these strings:

DLGCHANGEPASSWORD
DLGINVALIDPASSWORD
DLGGETPASSWORD
PWProtected
control.ini
Password
The values for New Password and Retype New Password do not match.
Try again. Change PasswordaThe value for Old Password is not correct.
Check your screen-saver password, and then try again.&Password Options
Password ProtectedSet Password...
Change PasswordOld Password:New Password:
Retype New Password:The screen saver you are using is password protected. You must type in the screen saver password to turn off the screen saver.
Password:Incorrect password
Check your screen saver password and try again.

Does anyone else know anything about this topic?

Do not read if you don't like attention seeking self-advertisements!

Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels

Reply 1 of 5, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie

Take a look at the Windows 3.1 SDK specifically SCRNSAVE.H and SCRNSAVE.LIB. Each screensaver gets SCRNSAVE.LIB statically linked with it so the password stuff is duplicated in each one. It has symbols _TwiddleBits and _Encrypt. The password is all-uppercased, then each character is XORed with the length, the position, and the previous character first from left to right and then from right to left in two passes, and as if a * character was padded on each end where there is no previous character. There is some filtering to make sure the result is printable characters. The filtering for printable characters would make this lossy if what you're looking into is to try and decrypt.

Reply 2 of 5, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

Hi jakethompson1, thank you for taking the time to answer my question. Do you know where I might find or how to get this SDK?

EDIT:
Never mind, I found a copy.

Do not read if you don't like attention seeking self-advertisements!

Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels

Reply 3 of 5, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

Hey, what development environment would you recommend to access SCRNSAVE.LIB? Microsoft Visual Basic 4.0 doesn't seem to be able to handle those files. I could try declaring functions using the DECLARE statement but I would need to know the names and parameters.

Do not read if you don't like attention seeking self-advertisements!

Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels

Reply 4 of 5, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie

VB4 is 32-bit, no? So it wouldn't work.
The native development environment for something like this would be writing in C with Visual Studio 1.52c, or perhaps a contemporary Borland. Maybe you could get Open Watcom to work with it too.
_Encrypt and _TwiddleBits are not exported functions, so you wouldn't be able to call them yourself even if you link to it. I believe all the change/verify password functionality is abstracted away in scrnsave.lib and a screensaver is just expected to pass passwords to it.

Reply 5 of 5, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

vb4 also has a 16-bit version. I installed and ran it in Windows 3.11.

Do not read if you don't like attention seeking self-advertisements!

Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels