Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Encrypting my passwords in a text file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 980

PostPosted: Fri May 29, 2015 7:34 pm    Post subject: Encrypting my passwords in a text file Reply with quote

I'd like to store my passwords in a text file and then encrypt that text file so that it can be decrypted with only a single password. How can I do this?
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Fri May 29, 2015 7:45 pm    Post subject: Reply with quote

You can encrypt it with GPG.
Or you can use soft designed for safekeeping passwords. There is gnome keyring, keypass, and some other tools like that and you will certainly find them more convenient than encrypting a text file by hand.
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Fri May 29, 2015 7:46 pm    Post subject: Reply with quote

For this purpose i use app-admin/keepassx .

Otherwise you could use gpg and your favorite editor.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10157
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri May 29, 2015 7:46 pm    Post subject: Reply with quote

Definitely a TIMTOWTDI type of question. Just one of many methods:
Code:
~ $ echo "Hello, world!" >hello.txt
openssl enc -aes128 -in hello.txt -out hello.enc
rm hello.txt
You'll be prompted for a password during encryption. Also it's better to wipe the cleartext file: see app-misc/wipe, among others.

Recovering the cleartext:
Code:
~ $ openssl enc -d -aes128 -in hello.enc -out hello.txt
Again, you'll be prompted for the password.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42592
Location: 56N 3W

PostPosted: Fri May 29, 2015 8:15 pm    Post subject: Reply with quote

John R. Graham,

Wipe is useless on a SSD, where you cannot do overwrite in place anyway.
I'm not sure its useful on a journaled fs either.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3648
Location: Hamburg

PostPosted: Fri May 29, 2015 9:03 pm    Post subject: Reply with quote

The clear text file might be created on a tmpfs fs ?
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10157
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri May 29, 2015 9:30 pm    Post subject: Reply with quote

NeddySeagoon wrote:
John R. Graham,

Wipe is useless on a SSD, where you cannot do overwrite in place anyway.
Yes, I know. We never move sensitive material around in the clear on solid state media for that very reason. Operationally, we always store cleartext on non-solid state, non-journaled media.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Fri May 29, 2015 10:55 pm    Post subject: Reply with quote

Quote:
Wipe is useless on a SSD, where you cannot do overwrite in place anyway.
what 'bout trim?

toralf, of course it can
If you can load data with a stdin instead if file it's even easier:
command <<< "text"

does not create input file :)
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2968
Location: Germany

PostPosted: Fri May 29, 2015 11:28 pm    Post subject: Reply with quote

szatox wrote:
Quote:
Wipe is useless on a SSD, where you cannot do overwrite in place anyway.
what 'bout trim?


It's harder/takes longer to delete stuff on a HDD (since you actually have to overwrite everything and wait ages for that to happen), with SSD the data is gone fast but it's less clear what happens under the hood. From a naive user point of view there is no way to get data back after the data was overwritten or trimmed, but whether the SSD actually irrecoverably erases those cells in a timely manner - who knows, the SSD is a black box, you'd have to verify this somehow for each model/firmware/...
Back to top
View user's profile Send private message
not a day goes by
n00b
n00b


Joined: 30 May 2015
Posts: 8
Location: de

PostPosted: Sat May 30, 2015 5:53 pm    Post subject: Reply with quote

I don't know if this isn't a bit quick and dirty, but to keep track of my various not so important site/login/password combinations, I use vim encryption as shown here.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum