473,771 Members | 2,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Storing Passwords

I've a number of scripts set up that require a username/password
combination to log in elsewhere. It's gotten to the point where I
need to keep them in a more secure location, instead of just in the
scripts themselves. I did a bit of searching, and haven't come up
with a great way to store passwords using 2-way encryption (I have to
send them as plain text). Has anyone seen anything that fits this
need? I whipped up something using base64 and pickle, to keep them in
a dictionary and at least prevent them from being plain text, but it
seems a bit insecure all the same. Any ideas, much appreciated.

Thanks!

Eric
Aug 20 '08 #1
3 1879
On Tue, 19 Aug 2008 21:44:04 -0400, Eric Wertman wrote:
I've a number of scripts set up that require a username/password
combination to log in elsewhere. It's gotten to the point where I
need to keep them in a more secure location, instead of just in the
scripts themselves. I did a bit of searching, and haven't come up
with a great way to store passwords using 2-way encryption (I have to
send them as plain text). Has anyone seen anything that fits this
need? I whipped up something using base64 and pickle, to keep them in
a dictionary and at least prevent them from being plain text, but it
seems a bit insecure all the same. Any ideas, much appreciated.
Have you checked pyDes?

http://sourceforge.net/projects/pydes/

or

http://www.example-code.com/python/c...TestVector.asp

there is a link to a library called chilkat and it looks like
this library provides some 3des functionality.

HTH.

--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
Aug 20 '08 #2
"Eric Wertman" <ew******@gmail .comwrites:
I whipped up something using base64 and pickle, to keep them in
a dictionary and at least prevent them from being plain text, but it
seems a bit insecure all the same. Any ideas, much appreciated.
If you want people other than yourself to be able to run the scripts
without knowing any passwords, or if you want the scripts to work on
an unattended machine, this is traditionally quite a difficult
problem, solved by special purpose hardware in more serious
deployments. If you don't mind requiring a special master passphrase
to access the stored passwords, one approach might be:

- encrypt the passwords under some master key M, derived from a passphrase

- have a background process that holds M in ram, i.e. you start the
process and type the passphrase into it at the start of your work session.
The background process then takes requests from client processes that
are running on the same machine (not over the internet).

- Your scripts connect to the process to access the decrypted
passwords. The background operates over a local socket and
checks that any connecting process is running under your login
credentials. AF_UNIX sockets under Linux support these
operations but I think the standard Python socket module
currently doesn't implement them. I sort of remember seeing a
patch in the bug tracker for the purpose, but maybe I'm thinking
wishfully.

The ssh-agent program (part of openssh) supports storing a secret key in
a local socket listener. Maybe there is some way to use that program
to get at your passwords. A module for this would make a nice Python recipe.
Aug 21 '08 #3
Paul Rubin <http://ph****@NOSPAM.i nvalidwrites:
AF_UNIX sockets under Linux support these
operations but I think the standard Python socket module
currently doesn't implement them. I sort of remember seeing a
patch in the bug tracker for the purpose, but maybe I'm thinking
wishfully.
I see now that I have a bookmarked clpy post from Sebastian 'lunar'
Wiesner with this url:

http://pyside.blogspot.com/2007/07/u...th-python.html

I have not gotten around to trying out that approach.
Aug 21 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1692
by: Fred Emmott | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi - just wondering how I should store passwords in a database - I was thinking MD5 hashes would be a good idea - but I've heard it's better to "salt" them - how would I do this? I've tried google, but most of the results seem to be written by people with no idea of security implementations, thinking that "encryption" = "magic security dust".
6
2452
by: Bartosz Wegrzyn | last post by:
hi, I would like to store windows passwords and usernames in database. Please tell me where to start? What database can I use? Can I use free microsoft database? Thanks Bart
1
2237
by: Oleg Lebedev | last post by:
My application needs to store user names and passwords in the database via JDBC connection. What is the right way to do this? What should be the database type of the password column? How do I encrypt the password before sending it to the database? What other database settings need to be enabled for this to work? Thanks. Oleg
4
2097
by: Jefferson Cowart | last post by:
I'm writing a program for a college to use to allow students to register their computers for use on the network. Aside from a bunch of security related checks I would like the program to offer to store the users network username and password so when they access network servers they are not prompted for their username every time. I can do it manually through the user accounts control panel -> Advanced Tab -> "Manage Passwords" button, but...
4
1880
by: VB Programmer | last post by:
I am using SQL Server as the database for my ASP.NET app. I have a users table with a password field. What is the best way to encrypt it before it goes into the table, then decrypt it to read the value? Any sample code or links would be helpful. Thanks!
3
1319
by: Kevin L | last post by:
I want to store database credentials in either the registry or a file. What is the easiest way to encrypt this information?
0
1156
by: scoomey | last post by:
Hi folks- I've got an interesting problem. For our homebrewed PHP intranet application, I will soon be required to give users access to their email/calendar information from Microsoft Exchange. I've found a nice set of classes that seems to pretty seemlessly integrate PHP with Exchange via WebDAV. (Wish this could be done over SOAP, but that's another issue entirely.) Here's the issue: Currently, I authenticate all users via LDAP to...
5
1784
by: djc | last post by:
is it still customary to use web.config and global.asax to store connection strings? For example storing the string in web.config and using application start procedure in global.asax to declare a global app variable? I'm an off and on hobby programmer and this was the last method recommended to me. As I start new projects I try to find out and follow the recommended practices of the day.
13
12688
by: =?Utf-8?B?QWRhbSBT?= | last post by:
I would like to know the best way to store credentials in a c# application. I am writing some administrative tools and will need to store username and password information for a domain account with elevated privileges. While I am sure this is not a "best practice" I have not come up with a way around this as not all users of the app will have the permissions on their accounts. Any advice on is most appreciated. Thanks --
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.