473,376 Members | 1,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,376 software developers and data experts.

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 1840
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.invalidwrites:
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
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...
6
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
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...
4
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...
4
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...
3
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
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....
5
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...
13
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.