Jump to content

Regarding encryption


wa4chq

Recommended Posts

I found this today while searching info about editing an encrypted file. I have be using "gpg". Here's what I found:

I have spent countless hours on this quest, too: simply encrypt a text file with a passphrase with simple open+read/write access. I didn't want to deal with private/public keys nor keyrings bound to an OS login, blah, blah, blah. File encryption with passphrase only is so simple and so universal and perfect for a simple text file to hold passwords. No bloat nor complication of a database-driven solution like KeePass, etc. (which also requires data entry into multiple GUI elements rather than just typing your passwords in a searchable text file). The gold standard on Windows is Steganos LockNote. How to do it on Linux? Surprisingly very difficult to find, but...

I finally converged on the recommendation I consider best: cream. http://cream.sourceforge.net/ Cream is a facade to vim to make it more-user-friendly ... useful for other family members (I am a Linux geek at work comfortable with vi[m], but I needed something more accessible for my family).

Just enter:

"vim -x yourfile.txt"

It will be saved as encrypted with a passphrase.

You can use vim or cream at this point:

"vim yourfile.txt" or "cream yourfile.txt".

Either one will natively open "yourfile.txt" and prompt for the passphrase and transparently allow edits and re-saving as encrypted. FINALLY the quest has been completed !!!!

I think it's pretty cool.....

  • Like 1
Link to comment
Share on other sites

securitybreach

Holy crap, I have been using vim for over 10 years and did not know that it had built in encryption. Now to see how good the encryption actually is.

 

Well crap..

From the VIM documentation:

  • The algorithm used is breakable. A 4 character key in about one hour, a 6 character key in one day (on a Pentium 133 PC). This requires that you know some text that must appear in the file. An expert can break it for any key. When the text has been decrypted, this also means that the key can be revealed, and other files encrypted with the same key can be decrypted.

  • Like 3
Link to comment
Share on other sites

V.T. Eric Layton

COOL, but definitely NOT meant for high security applications. It's safe to use to keep your wife, kids, co-workers from being nosy, though.

  • Like 2
Link to comment
Share on other sites

securitybreach

COOL, but definitely NOT meant for high security applications. It's safe to use to keep your wife, kids, co-workers from being nosy, though.

 

True :thumbsup:

  • Like 1
Link to comment
Share on other sites

I found it yesterday because I was trying to find a way to edit my *.gpg file. I use GPG to encrypt my passwords. I didn't realize using VIMs encryption was weak but I only have one item in that file I made yesterday. But it is kind of important so I will continue to look for ways to edit my *.gpg file. But for general use, I'll use the VIM method. Would encrypting it twice buy time? :hmm:

Link to comment
Share on other sites

securitybreach

Would encrypting it twice buy time? :hmm:

 

If it's as easy as they claim, encrypting it 50 times wouldn't slow it down much.

  • Like 1
Link to comment
Share on other sites

Would encrypting it twice buy time? :hmm:

 

If it's as easy as they claim, encrypting it 50 times wouldn't slow it down much.

Yeah, I sorta was just kiddin'.... :teehee: What I do for some passwords is just write down a question only I would know the answer to, and that's the password.....then encrypt it.

Link to comment
Share on other sites

V.T. Eric Layton

Neil, you can encrypt/decrypt (using gpg) in Slackware all day long with a built-in app called GNU Privacy Assistant (gpa). I've been using it for years and years with no troubles at all. :)

 

D5Vv6s7.png

  • Like 1
Link to comment
Share on other sites

Hey Eric....I use gpg but I've only done it from the command line....I never saw the gui shown above. I am still using gpg and can decrypt but I haven't been able to edit the contents.....I get overwhelmed sometimes reading man pages. I guess if I just made up a new file with the updated contents I could generate a new key and still retain my current password to decrypt the *.gpg file?

On another tack....I had to replace my hd on the lappy a few months ago. I've partitioned it but have only gotten around to installing MX-18...... Have a slack 14.2 disc when the time comes....

 

Just found "seahorse" installed.....reckon it's a frontend for GnuGPG

Edited by wa4chq
  • Like 1
Link to comment
Share on other sites

I will have to read up a little about it... Decrypting isn't the problem and really, either is the need to edit my file. It's just sometimes I have to change one of the passwords in that file and I don't know how to edit the file.

Link to comment
Share on other sites

Decrypt file --> edit file --> Encrypt file

 

All done. :)

Tnx Eric and it sounds easy enough but I use gpg from cli....actually I use:

gpg -d *.gpg

and it prints it out to my screen. Can't edit it.

Link to comment
Share on other sites

I'm looking at Seahorse right now and in the help section it has this:

 

Create a new keyring

 

Use keyrings to group related passwords. You can choose to protect your keyring with a password.

 

 

Create a new password keyring:


  • Select FileNew….

  • Choose Password Keyring and press Continue.

  • Choose a name for your new keyring, then press OK to continue.

  • To password protect your keyring, choose a password, and retype it to confirm your choice. Leave both the fields blank if you want your keyring to remain unlocked at all times.

  • Press Continue to finish creating the keyring. If you have not protected your keyring with a password, you will need to confirm that this is how you want to proceed.

Your new keyring will now be listed under Passwords.

This has nothing to do with editing my passwords but it looks easier to follow than the man page for gpg. If I try this I wonder if I could use the old password I have when decrypting my password file with gpg -d?

Link to comment
Share on other sites

V.T. Eric Layton

When decrypting from CLI, it may display the decrypted file, but you need to use an editor to edit it. If you prefer to stay in CLI, open the decrypted file with VIM, NANO EMACS... whatever your flavor - edit, save, encrypt again. :)

 

HMM... I don't know that it would be a good idea to create a new keyring. Having more than one on your system could lead to confusion. What app is currently handling your keyring? Do you know?

  • Like 1
Link to comment
Share on other sites

When decrypting from CLI, it may display the decrypted file, but you need to use an editor to edit it. If you prefer to stay in CLI, open the decrypted file with VIM, NANO EMACS... whatever your flavor - edit, save, encrypt again. :)

 

HMM... I don't know that it would be a good idea to create a new keyring. Having more than one on your system could lead to confusion. What app is currently handling your keyring? Do you know?

I am using GPG....that's about all I know. I set it up from the CLI a few years ago. As far as opening the decrypted file with NANO or VIM....not sure what you mean.

I thought about just doing some tests, creating a file.gpg containing anything and encrypting it. So are you saying if I encrypted "something_else" to "something_else.gpg" I should use the same keyring and password I use for the other encrypted file? Boy, I is getting confused! lol

Link to comment
Share on other sites

V.T. Eric Layton

GPG is a form of encryption, not an app. What is the frontend for the GPG on that system? Just curious...

  • Like 1
Link to comment
Share on other sites

I'm sorry I'm a dork when it comes to this stuff..... I'm using MX-18 now and the first thing I did so I could get to my encrypted stuff was to install GPG. I don't know what the frontend is. Yesterday I found Seahorse and I see my personal PGP key....but I haven't a clue how to use Seahorse.....reading their help page was not a big help....lol Hey, its all good......things are fine the way they are and I've been dealing with this setup without being able to edit....I just have to go an extra step to make a separate file that contains a new password and phrase it such that only I know what it is.....here's an example: "D-G"...... lol.... Hey, thanks for taking the time to help me with this...... it's good.....

Link to comment
Share on other sites

V.T. Eric Layton

Neil said, "I'm sorry I'm a dork when it comes to this stuff..."

 

Don't be sorry. I don't remember most of this stuff anymore these days. I use search engines for really technical information... oh, and Josh. ;)

  • Like 1
Link to comment
Share on other sites

securitybreach

Neil said, "I'm sorry I'm a dork when it comes to this stuff..."

 

Don't be sorry. I don't remember most of this stuff anymore these days. I use search engines for really technical information... oh, and Josh. ;)

 

Who in turn, uses his Google Fu to arrive at the solution B)

  • Like 2
Link to comment
Share on other sites

Good morning.... Google is a big help for most of my problems but there are times I just don't get it. Maybe it's how they word it. There are many subjects I can understand but there are some that are just way over my head. Note picture on the left..... You guys have been a big help in explaining things in terms I understand....most of the time....lol. I'm glad there's no test! Have a great Thursday....rain (again) here in S. E. Virginia.

Link to comment
Share on other sites

V.T. Eric Layton

The rains will be starting here in Florida pretty soon. Today's going to be a beautiful day, though... 54F right now, 73F later in the day. I'm enjoying this for as long as it lasts. The miserable, hot, humid weather will be here to stay (for about 6 months) before we know it. :(

 

HA! Google fu... had to look that one up. I'm a bit rusty on my Zen terminology. ;)

 

https://www.urbandictionary.com/define.php?term=google-fu

  • Like 2
Link to comment
Share on other sites

GUI frontends for GPG

Something to read that might be helpful...

 

http://blog.ghostint...g-command-line/

Thanks for the frontends and useful read..... I didn't see your post until now.... I actually saw the article the other day during my search, but I didn't get to read much of it. My internet time is limited to how busy we are at work. Lately, we have not been busy...lol.... Tnx again.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...