News for hackers. Stuff that matters.
Re:Rustls: new, modern TLS library written in Rust by oconnore on Saturday July 09, 2016 @10:15PM (#12064268)
I'm developing a twitch whenever I see the word "modern" in a software description. It doesn't actually say anything about what you're doing.
Re:Rustls: new, modern TLS library written in Rust by rurban on Sunday July 10, 2016 @05:10AM (#12065041)
It does. There are distinct properties attached to Modernism and Modern. (I'm architect, hence I'm very much attached to these terms. Unlike SW people who didn't grow up with that).

First of all, it's the opposite of Post-Modern, to the perl style do it all in myriads of ways, everything is allowed, OpenSSL style. With Modern, only the best API and implementation is allowed. API's are Stanford style well-planned ahead of time, and not adhoc added New-Jersey style. Changes to the API need a rename, not just a major version bump. Hand-waving simplified development models are okay for a post-modern everything is allowed world, whilst modernism aims for long-term goals, making it easier for the user, not the developer.

Modernism is based on "Form Follows Function", and not the other way round. Reduce it, abstract it. Functionalism is everything, marketing is less important.

And to avoid popular misconceptions, in our current era "Modern" doesn't mean "New" at all. Modern is more old Stanford-style development. Check the Unix Haters handbook e.g. Rust is new, but this choice alone doesn't allow the use of Modern. Rust is better, because of its superior semantics and guarantees, whilst still adhering to the C ABI. It's a library for everybody afterall, and not comparable to the latest ocaml, haskell or lisp TLS library, which only adheres to their ABI and needs wrappers to be useful for projects in other languages.

Re:Rustls: new, modern TLS library written in Rust by vxNsr on Sunday July 10, 2016 @05:34AM (#12065081)
You've given a while bunch of definitions for what you interpret modern to mean but none of those are inherent in the word which is what (I think) the op meant when complaining about its over usage.

So while I appreciate your attempt to redefine "modern" with all the above I'd rather people just used the more verbose explanation instead of using the meaningless term.

Re:Rustls: new, modern TLS library written in Rust by barrkel on Sunday July 10, 2016 @07:12AM (#12065246)
Nothing is inherent in a word other than what people understand it to mean, and the worlds where 'modern' is a term of jargon are larger overall than computing. It has fairly specific meanings in art, architecture, literature, and music.

Grandparent referred to the meaning of the jargon term in architecture. It's not his personal redefinition; it's an interpretation of a widespread understanding of the word mapped analogously to software.

Jargon is important. We'd have a hard time communicating if we could never create new words or imbue existing ones with new meanings by analogy. The more verbose explanation is mostly useful for laymen and beginners.

Re:Rustls: new, modern TLS library written in Rust by cmrdporcupine on Sunday July 10, 2016 @10:08AM (#12065611)
He's not redefining the term, he's giving the 'official' definition of modern from the humanities.

The word has spread in popular vernacular to mean 'the present' or 'contemporary' but for historians, philosophers, architects, art critics, critical theorists, etc. "modern" refers to a bunch of things, and the "modern era" is considered by many of them to be either over, extended, or exaggerated.

Re:Rustls: new, modern TLS library written in Rust by sitkack on Sunday July 10, 2016 @06:00AM (#12065114)
My personal list of "I'd rather" is pretty large. We should get together and compare notes.
Re:Rustls: new, modern TLS library written in Rust by e12e on Monday July 11, 2016 @10:45AM (#12071373)
I think Shakespeare got this one right:

  2. New and common; trite; commonplace. [Obs.]
     [1913 Webster]
  
     We have our philosophical persons, to make modern
     and familiar, things supernatural and causeless.
                                               --Shak.
Isn't that what we want from "modern" software? To "make modern and familiar" "things supernatural and causeless"? :-)
Re:Rustls: new, modern TLS library written in Rust by rurban on Sunday July 10, 2016 @05:39AM (#12065088)
Another interpretation of Modernist Development is team size:

A modern SW project consists typically of 1-2, max. 3 devs, a typical post-modern project of 20-200. With such member sizes consensus is rarely practical, political correctness and CoC discussions are taking over development, ABI and API's are driven by design and not by functionality and longevity.

I.e. modern development is small, functional and not designed by committee.

Re:Rustls: new, modern TLS library written in Rust by adamlett on Sunday July 10, 2016 @07:04AM (#12065230)
a typical post-modern project of 20-200. With such member sizes consensus is rarely practical, political correctness and CoC discussions are taking over development, ABI and API's are driven by design and not by functionality and longevity.

Is this something you feel to be true, or do you have any evidence to back up that claim?

Re:Rustls: new, modern TLS library written in Rust by bogomipz on Sunday July 10, 2016 @08:55AM (#12065449)
Why are you conflating building architecture and software architecture. I'm pretty sure no software developer has every thought of their project in terms of "post-modern."

New Jersey style? The PERL style? I've never heard of "New Jersey style." Are you joking? I'm almost positive that Perl didn't influence openssl development at all.

"Modern is more old Stanford-style development." I think you've read way to much into this. And sorry citing the "The UNIX Hater's Handbook" doesn't do much for the credibility of your odd argument.

Re:Rustls: new, modern TLS library written in Rust by jwmerrill on Sunday July 10, 2016 @09:53AM (#12065566)
New Jersey style is a reference to Richard Gabriel's "Worse is better" essay.

[1] https://en.m.wikipedia.org/wiki/Worse_is_better

[2] http://dreamsongs.com/WorseIsBetter.html

Re:Rustls: new, modern TLS library written in Rust by muflax on Sunday July 10, 2016 @10:07AM (#12065607)
Perl is explicitly postmodern. Here's Larry Wall explaining it: http://www.wall.org/~larry/pm.html
Re:Rustls: new, modern TLS library written in Rust by eatonphil on Sunday July 10, 2016 @09:55AM (#12065570)
Look into "New Jersey vs. MIT" and "worse is better". The idea more or less is that AT&T (in Jersey) cared more about software that shipped whereas MIT cared about more about good design. MIT produced Lisp and Lisp machines, Bell Labs produced C and Unix. Who won?
Re:Rustls: new, modern TLS library written in Rust by nickpsecurity on Sunday July 10, 2016 @10:22AM (#12065666)
The mainframes and OpenVMS (though its clone, Windows). They're produced closer to the MIT and cathedral styles with a practical focus. The mainframes still run the backends of our financial system, logistics, big retailers, and so on. Most stuff that people consume requires one of them. If a desktop is involved, it's usually Windows based with 90+% of the market share despite UNIX workstations and Linux desktops existing for a long time.

So, who won? Nobody. Both had success. Most successful, though, was combining a little bit of MIT method, cathedral, and ship fast from "worse is better." That's IBM and Microsoft's approach. A hybrid worthy of another Gabriel essay.

Re:Rustls: new, modern TLS library written in Rust by eatonphil on Sunday July 10, 2016 @11:15AM (#12065849)
Thanks for the additional perspective there. I'll have to keep that in mind.
Re:Rustls: new, modern TLS library written in Rust by nickpsecurity on Monday July 11, 2016 @11:44AM (#12071803)
Sure thing. :) And here's the OpenVMS & Windows connection in case you weren't aware of it:

http://windowsitpro.com/windows-client/windows-nt-and-vms-re...

Bill robbing Apple of GUI is well-known. Less known is he stole a more robust and secure architecture from OpenVMS that was most rock-solid of OS's. They managed to show what would happen if OpenVMS had no QA process during development. Yet, recent efforts have gotten Windows Server reliable enough that the connection is more believable. :)

Re:Rustls: new, modern TLS library written in Rust by houli on Sunday July 10, 2016 @11:56AM (#12065994)
What about all of these Perl scripts generating assembly code for AES for every architecture under the sun? https://github.com/openssl/openssl/tree/master/crypto/aes/as...
Re:Rustls: new, modern TLS library written in Rust by haberman on Saturday July 09, 2016 @10:42PM (#12064332)
I take it to mean "uses current, best practices." For example:

- C++: uses C++11 features, avoids non-RAII resources, prefers standard libraries over older, platform-specific libraries, not written as "C with classes."

- C: doesn't do weird stuff like bypassing malloc(), avoids undefined behavior.

- in general: has a test suite, probably uses continuous testing like Travis, uses modern language features to achieve cleaner & more robust code.

Re:Rustls: new, modern TLS library written in Rust by sdegutis on Saturday July 09, 2016 @10:46PM (#12064343)
> C: doesn't do weird stuff like bypassing malloc(), avoids undefined behavior.

Can you elaborate?

Re:Rustls: new, modern TLS library written in Rust by dward on Sunday July 10, 2016 @05:00AM (#12065019)
From the tcmalloc paper[0]:

> Speed is important for a malloc implementation because if malloc is not fast enough, application writers are inclined to write their own custom free lists on top of malloc. This can lead to extra complexity, and more memory usage unless the application writer is very careful to appropriately size the free lists and scavenge idle objects out of the free list.

An example of such an optimization is the arena allocator[1][2] employed by protobuf. Custom memory management schemes are not uncommon in performance critical code.

0: http://goog-perftools.sourceforge.net/doc/tcmalloc.html

1: https://en.m.wikipedia.org/wiki/Region-based_memory_manageme...

2: https://developers.google.com/protocol-buffers/docs/referenc...

Re:Rustls: new, modern TLS library written in Rust by haberman on Sunday July 10, 2016 @05:33AM (#12065077)
> An example of such an optimization is the arena allocator[1][2] employed by protobuf.

I work on the protobuf team at Google, so I'm aware of this.

Two things about that:

1. The underlying blocks for the arena allocator still come from the system allocator.

2. Because the arena allocator inhibits the capabilities of standard malloc-debugging tools like ASAN and Valgrind, the protobuf arena allocator includes special ASAN-aware code to mitigate this:

https://github.com/google/protobuf/blob/d64a2d9941c36a7bc2a7...

However, that code is ASAN-specific. It won't help other tools like Valgrind. So yes, different allocators are sometimes warranted for specific patterns like arenas. But if all you want is plain malloc()/free(), you should call malloc()/free().

If you're writing a library, letting the user specify their own allocation callback is also great, since it lets the user do whatever custom bookkeeping/pooling/etc. they want to do. But by default just call malloc()/free() (IMHO).

Re:Rustls: new, modern TLS library written in Rust by bjourne on Sunday July 10, 2016 @05:08AM (#12065039)
Re:Rustls: new, modern TLS library written in Rust by jmspring on Saturday July 09, 2016 @10:53PM (#12064362)
It's a bit of a naive comment, because it wholly depends on the libraries you include and what those do.

Use any of the debugging libraries that shim in their own alloc routines, you bypass malloc (or at least do a bunch of things that impact what gets malloc'd).

Re:Rustls: new, modern TLS library written in Rust by haberman on Saturday July 09, 2016 @11:14PM (#12064417)
Sure, but those libraries exist for the explicit purpose of giving malloc() special behavior. I'm talking about general-purpose libraries that implement their own malloc(), thereby preventing the use of these malloc()-hooking libraries.
Re:Rustls: new, modern TLS library written in Rust by therein on Sunday July 10, 2016 @05:13AM (#12065049)
He might be referring to "sbrk" [0]

[0] http://linux.die.net/man/2/sbrk

Re:Rustls: new, modern TLS library written in Rust by ctz on Sunday July 10, 2016 @03:38AM (#12064874)
I'm using 'modern' here in two ways:

- in reference to Mozilla's "Modern TLS" profile: https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_com...

- as an antonym for the unlimited backwards-compatibility, kitchen-sink-comprehensive approach of (say) OpenSSL or NSS.

Re:Rustls: new, modern TLS library written in Rust by stormbrew on Saturday July 09, 2016 @10:41PM (#12064331)
In this case I would tend to take "modern" to mean "not based on openssl."
Re:Rustls: new, modern TLS library written in Rust by sdegutis on Saturday July 09, 2016 @10:42PM (#12064333)
> The following things are broken, obsolete, badly designed, underspecified, dangerous and/or insane. Rustls does not support [...]
Re:Rustls: new, modern TLS library written in Rust by johncolanduoni on Saturday July 09, 2016 @11:06PM (#12064401)
I'd love to see an explanation for not supporting client authentication. Also, completely ruling out discrete-log DH and requiring PFS is not feasible unless you want to rule out a lot of clients and servers, on top of not supporting TLS 1.1.
Re:Rustls: new, modern TLS library written in Rust by ctz on Sunday July 10, 2016 @04:09AM (#12064910)
There's a few problems with it.

1. client auth in TLS1.2 and earlier is done at the wrong time in the handshake. As a result the client's identity (which unlike the server identity usually identifies a user; see sibling comment which confirms this) is sent in the clear. That's a big privacy failure.

2. to work around (1), some implementations do an initial server-auth handshake, then immediately renegotiate up to mutual-auth (renegotiations are encrypted). Renegotiation has quite a dismal history, and I definitely want to avoid it.

3. as a follow on from (2), the standard never described what implementations are expected to do if client/server identities change during renegotiation. This (partially) resulted in https://mitls.org/pages/attacks/3SHAKE

All of these are fixed in TLS1.3: client identities are encrypted and renegotiation is dropped.

Re:Rustls: new, modern TLS library written in Rust by mcpherrinm on Sunday July 10, 2016 @04:37AM (#12064966)
Yeah, trying to make TLS client identity private is a recipe for sadness (well, before 1.3).

At least in the environments I use TLS, which is interservice datacenter communications, there are no privacy issues (especially since you can just look at what container a connection comes from for the same amount of identity leaking).

Re:Rustls: new, modern TLS library written in Rust by gue5t on Sunday July 10, 2016 @09:04AM (#12065467)
Thank you, this is a very good explanation and now I'm convinced that this is the right thing to do.

But I do need mutual authentication, and want to avoid rolling my own crypto for it--so does Rustls expect to support client auth in TLS 1.3 when that spec is finalized and implemented?

Re:Rustls: new, modern TLS library written in Rust by kalkin on Sunday July 10, 2016 @10:30AM (#12065685)
Super nitpicky, but would it make sense in the README then to specify "client authentication per TLS 1.2 or earlier", as the non-feature, or something like that?
Re:Rustls: new, modern TLS library written in Rust by adekok on Saturday July 09, 2016 @11:37PM (#12064476)
> I'd love to see an explanation for not supporting client authentication.

My guess? They don't use it in their applications, so they don't think anyone else uses it, either.

TLS client authentication is widely used in 802.1X (WiFi and wired) authentication. I've seen it used in a lot of other situations, e.g. web client access (client cert + user password), LDAP client access, etc.

Maybe there are security issues in client authentication which they're aware of. If so, they should share them. But simply labeling client authentication as "obsolete" shows a close-minded attitude.

Re:Rustls: new, modern TLS library written in Rust by markus2012 on Sunday July 10, 2016 @12:36AM (#12064588)
Where I work client auth is used for a good (and growing) number of internal services.

Client auth is simple to use - our internal services are given the username from the CN, which they use to perform authorization checks. For a lot of simple internal services that don't require two-factor auth it works great.

Am I missing something better?

(We already have the infrastructure in place to deal with client keys)

Re:Rustls: new, modern TLS library written in Rust by sdegutis on Saturday July 09, 2016 @11:10PM (#12064411)
I've never even heard of client authentication until recently. That's probably why.
Re:Rustls: new, modern TLS library written in Rust by johncolanduoni on Saturday July 09, 2016 @11:31PM (#12064454)
If you've ever used OpenVPN, you've used TLS client authentication. That seems like a pretty huge hole to purposely put in your feature set. I understand not implementing it yet because it's more work, but I don't get drawing a line in the sand.
Re:Rustls: new, modern TLS library written in Rust by stormbrew on Saturday July 09, 2016 @11:17PM (#12064429)
Obscure is not on the list in GP's quote, and afaik client authentication is none of the things in that list. It's actually used a fair bit in uses of TLS that are not the open web.
Re:Rustls: new, modern TLS library written in Rust by spilk on Saturday July 09, 2016 @11:40PM (#12064480)
Coming from a US DoD background, TLS client authentication is mandated for nearly everything. Everyone carries keypairs around their neck on their ID card (PIV smartcard with x.509 certificates)
Re:Rustls: new, modern TLS library written in Rust by bluejekyll on Saturday July 09, 2016 @11:29PM (#12064450)
Yes. I've implemented client-auth with a private CA, specifically to authenticate services to each other.

It's a very handy tool when you have disparate networks.

Re:Rustls: new, modern TLS library written in Rust by vostok on Sunday July 10, 2016 @01:56AM (#12064715)
It seems especially wrongheaded as client certificates are used in certain academic environments.
Re:Rustls: new, modern TLS library written in Rust by michaelmior on Saturday July 09, 2016 @11:07PM (#12064403)
That comment is intended to say that Rustls doesn't support the things in the list below because the technologies in that list are broken, not because Rustls itself is broken. So the authors have chosen just not to implement anything in that list.
Re:Rustls: new, modern TLS library written in Rust by sdegutis on Saturday July 09, 2016 @11:09PM (#12064408)
Right, hence "modern".
Re:Rustls: new, modern TLS library written in Rust by caf on Sunday July 10, 2016 @03:21AM (#12064849)
I find that it often seems to be a synonym for "opinionated".
Re:Rustls: new, modern TLS library written in Rust by rectang on Monday July 11, 2016 @05:41AM (#12069916)
Likewise. "Modern" is a worthless word. In time, the flaws of any "modern" product will become apparent and it will be replaced by something more "modern".