News for hackers. Stuff that matters.
Re:OpenSSH 6.5 Released by jaryd on Thursday January 30, 2014 @10:13PM (#7155022)
The following two things are highlights for me:

  * ssh(1): Add a ssh_config(5) "Match" keyword that allows
   conditional configuration to be applied by matching on hostname,
   user and result of arbitrary commands.

 * ssh(1): Add support for client-side hostname canonicalisation
   using a set of DNS suffixes and rules in ssh_config(5). This
   allows unqualified names to be canonicalised to fully-qualified
   domain names to eliminate ambiguity when looking up keys in
   known_hosts or checking host certificate names.
Re:OpenSSH 6.5 Released by stormbrew on Thursday January 30, 2014 @10:41PM (#7155108)
Both great things. I'm pretty excited about elliptic curve keys and the ability to have ProxyCommand-like ProxyUseFDPass return an fd instead of act as an long-lived intermediary, personally.

A lot to like in this.

Re:OpenSSH 6.5 Released by nodata on Friday January 31, 2014 @03:08AM (#7155841)
The Match keyword is great, but the syntax of "and continue reading until the end of the file" is a pain. They should add an EndMatch keyboard to close the block, or force indentation or something.
Re:OpenSSH 6.5 Released by djmdjm on Thursday January 30, 2014 @11:09PM (#7155189)
More details on the hostname canonicalisation here: http://blog.djm.net.au/2014/01/hostname-canonicalisation-in-...
Re:OpenSSH 6.5 Released by newman314 on Friday January 31, 2014 @03:08PM (#7158871)
I would still like to see an easy way to switch between a gateway ssh host and going direct depending on location/IP.

If I'm home, I want to be able to ssh to the gateway machine automatically and when I'm at work, go direct.

Obviously, this can be fixed with a shell script but it's hacky.

Re:OpenSSH 6.5 Released by stormbrew on Friday January 31, 2014 @03:39PM (#7159051)
The Match keyword does allow you to configure based on your local address, so on first glance it would seem like it would allow you to do this, but for some reason ProxyCommand is not on the list of whitelisted keywords acceptable in a Match block. :/ That's really a shame.
Re:OpenSSH 6.5 Released by sneak on Friday January 31, 2014 @12:43AM (#7155493)
Bold move, defaulting to Curve25519 ECDH.

I'm not saying DH/DLP is broken, but the NSA declines to include non-EC DH (or RSA, for that matter) in their Suite B of algorithms approved for internal applications. It's nice to have the option of ECDH for day to day use.

http://en.wikipedia.org/wiki/NSA_Suite_B_Cryptography

Re:OpenSSH 6.5 Released by m0nastic on Friday January 31, 2014 @01:15AM (#7155580)
Aside from any security implications for EC, there's also a lot of practical benefits around the reduced sizes necessary.

We made a Suite B implementation for TPM's (where smaller key sizes are very very important).

Re:OpenSSH 6.5 Released by zwp on Friday January 31, 2014 @04:56AM (#7156032)
Just for interest [I'm not saying it's broken either] but this is interesting DLP progress announced within the last 12 hours:

https://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;23651c...

Re:OpenSSH 6.5 Released by mcpherrinm on Thursday January 30, 2014 @10:45PM (#7155120)
* Add a new private key format that uses a bcrypt KDF to better protect keys at rest.

This is pretty important to me: Keys are much less of a hazard if taken off a stolen laptop/disk.

Re:OpenSSH 6.5 Released by MichaelGG on Thursday January 30, 2014 @11:56PM (#7155342)
Shouldn't your laptop/disks be fully encrypted anyways? It's good to have a strong KDF, but the stolen laptop threat should be already covered, I'd hope.
Re:OpenSSH 6.5 Released by mcpherrinm on Friday January 31, 2014 @12:48AM (#7155509)
True, but what if it's stolen while the laptop is turned on and the disk keys are in memory? I rarely shut my laptop off, and while I may be a little overly paranoid, it is certainly possible for a local attacker to gain memory bus access and read out disk encryption keys.

Multiple layers of security are always good!

Re:OpenSSH 6.5 Released by jlgaddis on Friday January 31, 2014 @12:45AM (#7155499)
I have locks on my doors but that doesn't mean I don't have a pistol next to my bed.
Re:OpenSSH 6.5 Released by midas007 on Friday January 31, 2014 @01:57AM (#7155678)
Or use monkeysphere and gpg keys that serve as ssh keys, which (gpg priv keys) is itself encrypted on encrypted disks with passphrase in an 10M rounds of AES25 encrypted password manager with a very long passphrase itself.
Re:OpenSSH 6.5 Released by jethro_tell on Thursday January 30, 2014 @11:17PM (#7155209)
What is a KDF? What is this doing in layman's terms?
Re:OpenSSH 6.5 Released by sneak on Thursday January 30, 2014 @11:46PM (#7155295)
When you type in your password to decrypt your ssh private key on disk, it runs the string (and optionally also some salt, stored in the clear with the encrypted key to foil rainbowtable lookup attacks) through a key derivation function, or KDF. The output is used as the encryption key for the symmetric cipher that protects the key at rest.

One can use any cryptographically secure (output indistinguishable from random, infeasible to predict input given output, et c) hash as a KDF but the faster it is to run, the more per second an attacker can try when attempting to bruteforce your password/phrase after stealing your private key in its encrypted, on-disk format.

bcrypt is a function that is specifically designed to be somewhat time consuming to calculate (with a variable difficulty argument to the function itself), to reduce the bruteforce rate (in normal use, it's only run once or twice, once for each password input). Its cousin scrypt was specifically designed to also require a fair bit of memory to calculate, as well, reducing effective parallelism in fpga/asic implementations as the memory circuits must be included as well.

The difference between one <1ms hash and 100ms hash doesn't much matter to a user, but is the difference between a 10-char password being feasibly bruteforceable or not on dedicated hardware where you have to run 256^10 iterations. It adds up fast.

My ssh private key password is 8 chars that match [a-z0-9]. This matters a lot.

Re:OpenSSH 6.5 Released by midas007 on Friday January 31, 2014 @02:03AM (#7155697)
Ideally, a KDF should use as many resources as practical.

The NIST competition process of favoring performant algorithms is not always in the interests of users because it means it's cheaper to bruteforce/crack.

Re:OpenSSH 6.5 Released by sp332 on Friday January 31, 2014 @01:42PM (#7158318)
The NIST competition was for a hash function, not a key derivation function.
Re:OpenSSH 6.5 Released by sneak on Saturday February 01, 2014 @01:05AM (#7161015)
Err, more like 128^10 iterations, unless you have the unicode snowman in there.
Re:OpenSSH 6.5 Released by swordswinger12 on Thursday January 30, 2014 @11:23PM (#7155225)
Key Derivation Function. It's a tool cryptographers use to derive cryptographic keys from different kinds of input material. Their most common use is to 'amplify' the entropy of a password or other low-entropy input and make it suitable for use as a key for a symmetric encryption scheme.
Re:OpenSSH 6.5 Released by midas007 on Friday January 31, 2014 @02:00AM (#7155688)
yourmagicnoncrappypassword -> 101010101110101111...
Re:OpenSSH 6.5 Released by XorNot on Thursday January 30, 2014 @11:13PM (#7155196)
OpenSSH-HPN's patchset really needs to be merged into the mainline. There's no excuse for not at least incorporating dynamic window scaling into the core protocol since it's such a ridiculous omission at this point.
Re:OpenSSH 6.5 Released by jaryd on Thursday January 30, 2014 @11:18PM (#7155217)
Re:OpenSSH 6.5 Released by midas007 on Friday January 31, 2014 @01:56AM (#7155669)
Is there a patch for 6.4p1/6.5p1 or does 6.1p1 work?
Re:OpenSSH 6.5 Released by sneak on Thursday January 30, 2014 @11:54PM (#7155335)
I was under the impression that it had been, though I don't know why i thought that.

You're totally right. Do we know why it hasn't been, yet (if indeed I am misremembering)?

Re:OpenSSH 6.5 Released by andreaso on Friday January 31, 2014 @12:13PM (#7157719)
Well, FreeBSD 9.0 merged those patches into its OpenSSH. Perhaps that was what was floating in the back of your mind?
Re:OpenSSH 6.5 Released by dmm on Friday January 31, 2014 @07:27AM (#7156323)
From a quick look I didn't see any license associated with these patches.

Searching around on the -misc archives, djm claims performance improvements similar to HPN and declares no interest in implementing the NONE cipher(no encryption after authentication).

http://marc.info/?l=openssh-unix-dev&m=123483715829020&w=2

Re:OpenSSH 6.5 Released by jevinskie on Friday January 31, 2014 @03:10PM (#7158880)
I like the ability to use a null-cipher too. Handy when doing file transfers to embedded devices with puny CPUs.
Re:OpenSSH 6.5 Released by sneak on Thursday January 30, 2014 @11:52PM (#7155329)
Wonderful to see them using a modern, time-hard KDF finally.

One wonders where the kickstarter to get a proper time- and memory- hard KDF patched into GnuPG is? It's not even really that much of a compatibility issue, either (unless you are sharing private key files between many machines)...

You'd really think the tinfoil-hat paranoids that (until Snowden) comprise(d) the bulk of the pgp userbase would care about the keys used to keep their log-term keys on disk private. I was flabbergasted to see the (relatively) tiny number of iterations in use in the GnuPG kdf.

Re:OpenSSH 6.5 Released by papaf on Friday January 31, 2014 @12:42AM (#7155489)
I forgot my PGP passphrase and can no longer sign Java packages in the Sonatype maven repository. This is not a big deal for me but I did try to recover my passphrase.

I got an extension to John the Ripper that supports Gnu PGP keys and built a dictionary of permutations of words that I think I could have used in the passphrase.

I got nowhere. In this case, a passphrase > 20 characters was unbreakable to someone with modest computing power and an appropriate dictionary.

Edit: I did not save a revoke certificate because the Sonatype instructions did not include this step.

Re:OpenSSH 6.5 Released by willvarfar on Friday January 31, 2014 @01:39AM (#7155631)
How far you get as a private effort is not really characterizing the threat; the threat is a determined attacker with AMD GPUs by the dozen. And while it is easy to discount state-sized efforts as being uninterested in signing your Java packages, the real threat are the hobbyists and criminally minded pros who really do have rigs and really do brag about how they do go attack the long lists of hashed passwords that often turn up after website breaches.

Please use bcrypt on your new key, the one you will be writing down the password to ;)

Re:OpenSSH 6.5 Released by icebraining on Friday January 31, 2014 @12:30PM (#7157822)
Even those who don't have such rigs can just rent them from, for example, Moxie Marlinspike's Cloud Cracker: https://www.cloudcracker.com/
Re:OpenSSH 6.5 Released by cm3 on Friday January 31, 2014 @12:46PM (#7157904)
More than a few people requested Github and Bitbucket to support more than RSA keys but they've both ignored the request for ECDSA for the last few years. The changes in 6.5 should inspire them to skip ECDSA and add Ed25519 as an option. Please Github and Bitbucket do everyone a favor and support modern keys. Next step is to save cpu cycles by using Curve25519 when available in the client. It's illogical not to.
Re:OpenSSH 6.5 Released by mct on Thursday January 30, 2014 @11:27PM (#7155242)
I'm very happy to see djb's crypto work being supported in openssh!

Does anyone know offhand why ChaCha was chosen instead of XSalsa20, which is used in NaCl?

Re:OpenSSH 6.5 Released by arnehormann on Friday January 31, 2014 @02:55AM (#7155815)
ChaCha is a little faster and apparently a little more secure. Dig through http://www.ietf.org/mail-archive/web/tls/current/msg10843.ht... for reference.

EDIT found a better one: http://www.ietf.org/mail-archive/web/tls/current/msg10630.ht...

Re:OpenSSH 6.5 Released by fefe on Friday January 31, 2014 @02:46AM (#7155803)
"ChaCha" family of ciphers aim to increase the diffusion per round while achieving the same or slightly better performance.The Aumasson et al. paper also attacks ChaCha, achieving one round less: ChaCha6 with complexity 2^140 and ChaCha7 with complexity 2^231

https://en.wikipedia.org/wiki/ChaCha20

Also used in:

https://tools.ietf.org/id/draft-agl-tls-chacha20poly1305-04....

Re:OpenSSH 6.5 Released by ballard on Thursday January 30, 2014 @11:33PM (#7155252)
Re:OpenSSH 6.5 Released by akerl_ on Thursday January 30, 2014 @11:48PM (#7155305)
Awesome! Any chance the keychain patches can be applied against this?
Re:OpenSSH 6.5 Released by ballard on Friday January 31, 2014 @01:39AM (#7155632)
Ported care of Debian patches and apple open source:

https://github.com/steakknife/openssh/tree/apple-osx-openssh...

Update: it doesn't build yet, minor patch issue will fix tomrw.

Update 2: Fixed building, no warranty.

I'll refactor into patches, will be much simpler to validate.

Re:OpenSSH 6.5 Released by ballard on Saturday February 01, 2014 @09:13PM (#7164478)
As an update, I've started with clean patches from sources so it's all in a git repo instead of spread out in brew files and gists.

http://github.com/steakknife/openssh

Re:OpenSSH 6.5 Released by justincormack on Friday January 31, 2014 @03:38AM (#7155899)
it also has:

* sshd(8): Add support for pre-authentication sandboxing using the   Capsicum API introduced in FreeBSD 10.

Capsicum is a nice way to drop privs that shipped in FreeBSD 10 and is also being worked on for Linux.

Re:OpenSSH 6.5 Released by newman314 on Friday January 31, 2014 @02:46PM (#7158761)
Given that Ubuntu 14.04 is not released yet, it would be great to see this in a LTS release...