Skip to content

Changing the password

Nikhil VJ edited this page Oct 12, 2018 · 2 revisions

Changing the password on Ubuntu

From the main program folder, run this in terminal:

python3 utilities/encrypt.py "password"  
mv rsa_key.bin ./pw/

Changing the password on Windows

EDIT: 12 Oct 18: Yikes, didn't carry this forward in subsequent releases! Will try to include a standalone exe from next release.

  • In the main prgram folder, double-click a shortcut named "encrypt".
  • That will launch the same program in interactive mode.
  • It will ask you to enter a password, and will generate an rsa_key.bin file for you in the main folder.
  • You have to move that file into "pw" folder, replacing the .bin file that already there (which held the key for the last password)

Explanation for password mechanism

The encrypt.py program use RSA encryption to generate a key file. Put that in the pw/ folder, replacing the earlier one which was for the earlier password. During program run, a decryption program performs a computation on the rsa_key.bin file. The file "computes" successfully only with the true password string is provided. If the computation fails, the program returns False and so the main program terminates the API call with an error message. The password itself is never stored anywhere by the program, and AFAIK it cannot be easily computed out from the key generated. As such, there is no password recovery here; if you lost the old one then you have to generate a new one.

Workaround if encountering problems with password mechanism

  • During the course of this program's development there have been many issues with the encryption-decryption mechanism. We've ironed out a lot of wrinkles by now, but in future should a problem arise again, here is a workaround:
  • Open GTFSserverfunctions.py file and find the line def decrpyt(.... That's the decrpyt function.
  • Comment out all the lines in this function and put in a simple if condition to check the incoming password argument against your password string and return True or False, or simply return True to accept any junk value.
  • This will work even for the Windows standalone version as well, since the GTFSserverfunctions.py file is still loaded in fresh by the program every time it runs.