LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-02-2017, 03:13 PM   #16
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,636
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933

Quote:
Originally Posted by justmy2cents View Post
Thanks for your input, you're correct this is a "security through obscurity" system but maybe you misunderstood (or I don't understand something), but I don't plan to "handle" the other 151 keys (but just the one key that I use), as I only make one key then copy it 151 times. Also their all symmetrically enciphered with the same length passphrase so they'll all be similar sizes.. It's true once they understand this system is set out they be more knowledgeable on what to do. But nevertheless it should be a gamble as there's 152 similar looking files, and I don't see how they could tell which one is my real key.. They would have to waste time brute forcing each one (two times as the pwgen pass is an overlay over the default required pass).. In the end though I'll probably just opt for the certificate idea becomes its seems more convenient. Thanks again!
My fundamental recommendation is that you should encrypt these files, n-o-t with any(!) sort of "passphrase," but with "keys."

You encrypt the file using your key, and you also provide the public key(s) of the one-or-more recipients who are to be authorized to decrypt it. Any of them can now decrypt the contents ... as can you ... but no one else can.

The process of preparing the material and encrypting it is trivial, as is the process, on their side, of retrieving what you sent. All they need is their private key, which only they possess.

There is no need for further security: the certificates provide a level of entropy that no password can begin to match. (Up to 4,096 bits' worth, at this writing.) The encryption/decryption sequence is easy for the intended parties, and effectively impossible for anyone and everyone else. All that you have to do is to make sure that the private keys do remain private.

All that monkey-business with passphrases and KeepassX? You simply don't need to bother. This is much stronger. (As well as, "easy.")

Last edited by sundialsvcs; 06-02-2017 at 03:15 PM.
 
Old 06-02-2017, 04:42 PM   #17
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
I'll have to look more into certificates and how their implemented.. But I heard that a 3072-bit asymmetric key is equal to a 128-bit symmetric key, and also asymmetric algorithms are susceptible to Shor's algorithm (quantum computing).

Last edited by justmy2cents; 06-05-2017 at 09:42 AM.
 
Old 06-02-2017, 07:32 PM   #18
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by justmy2cents View Post
But I heard that a 3072-bit asymmetric key is equal to a 128-bit symmetric key,
Yes. RSA 3072 bit keys give approximately the same security as a 128 bit symmetric key, that's why you don't use 128 bit RSA keys.

Quote:
and also asymmetric algorithms are susceptible to Shor's algorithm (quantum computing).
Yes, Shor's algorithm is effective against RSA and ECC. But building a quantum computer capable of breaking keys larger than 2 or 3 bits is an open research topic. There are some asymmetric algorithms that are not susceptible to Shor's algorithm, but they don't see much use currently because they are slow and require large keys, see Post quantum cryptography.
 
Old 06-02-2017, 08:17 PM   #19
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,636
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
But also ...(!) in this regard, "I would but beg you to climb down from the mountain-top of The Theoretical, and instead to remain focused upon the Enormous Valley that pragmatically applies to you!"

From your perspective, you simply want "to do (much) better than Passwords."

And it so happens that certificates, as presently implemented by PGP®/GPG, already beats the socks off this approach.

You can today send an encrypted file "to multiple, yet specified(!) recipients," without having to pre-suppose the existence of any sort of "shared secret." (i.e. a "puny password.")

Instead, you need only possess, for each intended recipient, a "public thing" (freely given to you by each recipient), that is derived from some "private thing" that, in fact, you never possess. You send your encrypted message to them in confidence, because you are (somehow ...) confident that only they possess the one-and-only existing copy of that "private thing," and that only the possessor of that very "private thing" will be able to decrypt your message.

I-f you can be sufficiently-confident of this, then: "this beats the holy-Hell out of 'Mere Passwords.'"

Last edited by sundialsvcs; 06-02-2017 at 08:20 PM.
 
Old 06-05-2017, 09:50 AM   #20
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by ntubski View Post
Yes. RSA 3072 bit keys give approximately the same security as a 128 bit symmetric key, that's why you don't use 128 bit RSA keys.
The MAX you can usually request though is a 4096-key, and /dev/random must be used to improve entropy (because by itself it's not sufficient)



Quote:
Yes, Shor's algorithm is effective against RSA and ECC. But building a quantum computer capable of breaking keys larger than 2 or 3 bits is an open research topic. There are some asymmetric algorithms that are not susceptible to Shor's algorithm, but they don't see much use currently because they are slow and require large keys, see Post quantum cryptography.
Yes im aware of MARS, Serpent, Two-Fish, RC6 and I may try those out depending how slow they are..
 
Old 06-05-2017, 09:59 AM   #21
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by sundialsvcs View Post
But also ...(!) in this regard, "I would but beg you to climb down from the mountain-top of The Theoretical, and instead to remain focused upon the Enormous Valley that pragmatically applies to you!"
That's not what Einstein would of said.

Quote:
You can today send an encrypted file "to multiple, yet specified(!) recipients," without having to pre-suppose the existence of any sort of "shared secret." (i.e. a "puny password.")
But there's still a shared key to get around that distance limitation, and the fact that this key is used to make communicating over long distances convenient, means that it must be sacrificing security somewhere (because security is not convenient).

Last edited by justmy2cents; 06-05-2017 at 10:32 AM.
 
Old 06-05-2017, 10:45 AM   #22
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by justmy2cents View Post
The MAX you can usually request though is a 4096-key,
Usually, yes.

Quote:
and /dev/random must be used to improve entropy (because by itself it's not sufficient)
Huh? I have no idea what you're trying to say.

Quote:
Yes im aware of MARS, Serpent, Two-Fish, RC6 and I may try those out depending how slow they are..
Those are all symmetric algorithms, so they don't replace RSA or ECC.
 
Old 06-05-2017, 10:49 AM   #23
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,636
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
Quote:
Originally Posted by justmy2cents View Post
But there's still a shared key to get around that distance limitation, and the fact that this key is used to make communicating over long distances convenient, means that it must be sacrificing security somewhere (because security is not convenient).
No, there is no "shared key!"

Conceptually, he message is enciphered using a randomly-chosen symmetric key that is generated by the software and known only to it. That key is then enciphered using the public key of each intended recipient.

Thus, the message can be securely retrieved by the possessor of the private key corresponding to any of these public keys. For those people, decrypting the message is easy and convenient. For anyone else, it is impossible.

"Shared Secrets" of any kind can never remain secret. But, each person can be issued an individual badge that is possessed only by them and which uniquely identifies them. If you possess one of the specific magickal amulets dictated by the sender of the message, the envelope becomes transparent and you can read the contents of the message. Your right to access the message is determined by what you possess, not what you "know."
 
Old 06-05-2017, 11:05 AM   #24
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by ntubski View Post
Usually, yes.


Huh? I have no idea what you're trying to say.
gpg --gen-key (which generates a key pair) has you use /dev/random to "gain enough entropy" which I think is due to the fact that RSA by itself does not have enough entropy, so it must use /dev/random..



Quote:
Those are all symmetric algorithms, so they don't replace RSA or ECC.
Well noted thank you.
 
Old 06-05-2017, 11:12 AM   #25
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by sundialsvcs View Post
No, there is no "shared key!"

Conceptually, he message is enciphered using a randomly-chosen symmetric key that is generated by the software and known only to it. That key is then enciphered using the public key of each intended recipient.

Thus, the message can be securely retrieved by the possessor of the private key corresponding to any of these public keys. For those people, decrypting the message is easy and convenient. For anyone else, it is impossible.

"Shared Secrets" of any kind can never remain secret. But, each person can be issued an individual badge that is possessed only by them and which uniquely identifies them. If you possess one of the specific magickal amulets dictated by the sender of the message, the envelope becomes transparent and you can read the contents of the message. Your right to access the message is determined by what you possess, not what you "know."
The definition that I have is (and I apologize if this irrelevant, im a noobie) that key agreement schemes use the Diffie-Hellman algorithm because it uses the same shared key without a key exchange, which is good cause when communicating over long distances (otherwise if a shared key is not used then the recipient of the message would have to have knowledge of the key-cipher used to encrypt the message, which means a key-exchange would have to take place; and a key-exchange is not feasible when communicating over long distances). So the way PKI works is that both people have a private key, with one sending the base, public key, and prime to the other. Then the other sends their public key while generating a shared key..

https://www.youtube.com/watch?v=GSIDS_lvRv4 (short Youtube vid on what im talking about)

Last edited by justmy2cents; 06-05-2017 at 11:27 AM.
 
Old 06-05-2017, 11:59 AM   #26
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by justmy2cents View Post
gpg --gen-key (which generates a key pair) has you use /dev/random to "gain enough entropy"
I haven't generated a key recently, but I would expect gpg to use /dev/random or equivalent APIs of the OS it's running on. I don't know what "has you use /dev/random" could possibly mean.

Quote:
which I think is due to the fact that RSA by itself does not have enough entropy
An algorithm, like RSA, cannot have or lack entropy, so this doesn't make any sense.
 
Old 06-05-2017, 12:13 PM   #27
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by ntubski View Post
I haven't generated a key recently, but I would expect gpg to use /dev/random or equivalent APIs of the OS it's running on. I don't know what "has you use /dev/random" could possibly mean.
/dev/random is when you move your mouse and type on the keyboard randomly to increase entropy


Quote:
An algorithm, like RSA, cannot have or lack entropy, so this doesn't make any sense.
You're right after a quick search I found it just needs entropy to generate a key pair.. I guess I meant asymmetric encryption technologies in general..

Last edited by justmy2cents; 06-05-2017 at 01:20 PM.
 
Old 06-05-2017, 01:11 PM   #28
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by justmy2cents View Post
/dev/random is when you move your mouse and type on the keyboard randomly to increase entropy
Oh that. That's mostly to make you feel better about your keys.
Some fun reading: https://www.2uo.de/myths-about-urandom/

Quote:
You're right after a quick search I found it just needs entropy to generate a key pair.. I guess I meant asymmetric encryption technologies general..
Generating symmetric keys requires as much entropy as asymmetric ones.
 
Old 06-05-2017, 07:31 PM   #29
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,636
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
At the risk of sounding "pedantic" at this point . . .

The specific "use of GPG" that I had in mind is one that allows you to encrypt a file in such a way that it can be decrypted by (only!!) those specific parties who were in possession of "the private keys which correspond to" a collection of public-keys which were (of course ...) known to the sender.

The sender generates a random symmetric-cipher key that is presumed to be "un-guessable." The sender then provides that key to each of the intended recipients, protected by each one's public key, so that only the corresponding private key can be used to retrieve it.

The entire notion of "key exchange," then, is entirely irrelevant. O ne party possesses the entire secret. The other party does not ... unless(!) they are able to decrypt the portion of the message which gives it to them.
 
Old 06-06-2017, 11:17 AM   #30
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by ntubski View Post
Oh that. That's mostly to make you feel better about your keys.
Some fun reading: https://www.2uo.de/myths-about-urandom/



Generating symmetric keys requires as much entropy as asymmetric ones.
Thanks alot for the info ill have to do more research on the topic
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to use GPG to encrypt/decrypt backup files usao Linux - Security 10 05-09-2016 12:10 AM
[SOLVED] GPG Encrypt without filename jonnybinthemix Linux - Newbie 15 06-13-2014 07:57 AM
gpg --verify multiple files Phorize Slackware 8 06-22-2011 07:25 AM
Encrypt backups with GPG to multiple tapes TBKDan Linux - Software 11 10-30-2009 01:09 AM
What is the best way to encrypt emails? GPG? abefroman Linux - Security 5 08-28-2009 04:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration