HNHacker News
TopNewBestAskShowJobs

richm44

326 karma · joined January 4, 2014

submissionscomments
richm44··on Comments on a Formal Verification of PolarSSL
Last time I checked mbed TLS omitted lots of pretty critical functionality such as certificate verification to the user - this stuff is far from trivial and is a core component of the MITM protection.
richm44··on The Bugs We Have to Kill [pdf]
There's a length field in a TLS record and also one in the heartbeat message itself. Heartbleed happened when the length field of the heartbeat message was longer than the length of the tls record.
richm44··on Kali Linux 2.0 Released
Has anyone seen a list of what tools have been added in this release?
richm44··on OpenSSL Security Advisory
I do agree the situation is now better, but personally I've still found contributing to be a lot harder than it should be even for trivial fixes.
richm44··on OpenSSL Security Advisory
It /was/ a drop in replacement for a single point in time but it isn't if you make use of any of the recent improvements openssl has added. For example auto selection of DH/ECDH primes and curves.

Note that recently a big clean up of the openssl codebase has taken place so openssl master no longer exposes the internals of structs etc. meaning it's both more auditable and more maintainable. This code is not yet released however.

richm44··on Introducing s2n, a New Open-Source TLS Implementation
Certainly true if you don't need them. However since code using the library as a TLS client is already partially present, support for certificate verification is definitely going to need to be added.

At the moment, I'm not that impressed with the testing since even making it build actually requires patching it! This is just due to one of the examples, but from the git history it's been broken since January.

richm44··on Introducing s2n, a New Open-Source TLS Implementation
There's nothing wrong with client certs (other than insane complexity). However ultimately s2n is likely to need to support operation as a client too at which point things like certificate validation etc. will be needed and the amount of code will increase.
richm44··on Introducing s2n, a New Open-Source TLS Implementation
Note that this library is currently only providing server functionality, and doesn't do certificate validation (in fact it appears to not do any of the X.509 parts of SSL/TLS). It's certainly interesting, but one of the reasons it's so small is that it's missing critical functionality for many use cases.
richm44··on Ask HN: What's bad about my CV?
Without knowing what kind of role you're aiming for this is pretty much impossible to answer.
richm44··on I Quit: What really goes on at Apple
At macromedia I had to list the projects I was working on outside the company - not a problem, but it needed to be done.
richm44··on TLS Prober – A tool for fingerprint SSL/TLS server implementations
Yes, please don't think I'm saying that I think protocols that start off as plain text then upgrade are a good design - I don't. All I mean there is that I've written the code required to fingerprint the implementation those use too, by performing the plain text negotiation before each probe.
richm44··on TLS Prober – A tool for fingerprint SSL/TLS server implementations
The aim of this tool is quite different to that of ssl labs (which is a great tool btw). This is very much focussed on what the server is using (or any SSL accelerators that might be in front of it).
richm44··on IRC History by Jarkko Oikarinen
Just a note that the QDataStream format is documented, and has been implemented in other languages such as Java. That doesn't mean that the Quassel protocol should replace IRC of course. :-)
richm44··on EFF’s Game Plan for Ending Global Mass Surveillance
You can add Certificate Transparency to that list http://www.certificate-transparency.org/ though it's pretty new and barely used right now.
richm44··on Google Isn’t Fixing Some Old Android Bugs
Actually normal support for windows 7 ended this month. You're only getting security updates for that now, not new features.
richm44··on What Made OO Be Successful
Dive!
richm44··on Problems with the Golang runtime and toolchain
The fact you can still see the penguin is the least of ECBs problems. If you can do an adaptive chosen plain text attack then you can easily retrieve the key when ECB is used.
richm44··on Linus Torvalds on semaphores (1999)
How about hardware transactional memory like the new TSX instructions in the haswell chips.
richm44··on Farewell, Dr. Dobb's
I'd just like to say thank you. Dr Dobb's was superb.
richm44··on Vulnerability in Microsoft TLS library could allow remote code execution
If you're just talking about me then fair enough - the problems I've publicly identified in TLS are pretty much edge cases. Thomas on the other hand has a pretty good track record if you'd care to check.
richm44··on Vulnerability in Microsoft TLS library could allow remote code execution
> It is "rubbish?" Nobody does that. Most crypto libraries are written in C or C++. > You can pre-JIT (AOT) managed code and check there too.

Take a look. You'll see that for example openssl uses perl to generate assembly, and nettle also uses native code. This is needed if you want to use things like the AES instructions on modern CPUs.

richm44··on Vulnerability in Microsoft TLS library could allow remote code execution
And the run-time of a managed language is 100% able to change all the timing of that if it's smart enough. It provides a guarantee of outcome not of timing. There are examples of unexpected optimisations even from static compilers such as gcc (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888 for example). There's nothing stopping the jvm from bailing out early even in your second example. If you'd done something like xoring all the bytes together then checking the result then maybe we'd be approaching something that it's unlike a jit could handle, but the code as is seems ripe for a decent optimiser to me. And remember that according to the spec you're now coding for a perfect optimiser, not just a decent one...
richm44··on Vulnerability in Microsoft TLS library could allow remote code execution
> The same is true with native code optimising.

This is rubbish. If I use custom assembler then that's what gets run. Even if I use C code then I know what the result will be since I can actually check.

> The paths should be identical for both failure and success states. That's fundamentally how you "fix" timing attacks.

That's certainly the ideal. But it's impossible - one result will succeed the other won't. The aim is to make sure both take the same time which is an achievable goal, however to do this you need to know what will execute. You might have that guarantee in practice on a particular JVM for example, but the whole point of using something like a JIT is that it will be smart about optimising stuff based on what actually happens. That's normally great, but this is a situation where all that needed is predictability not performance.

richm44··on Vulnerability in Microsoft TLS library could allow remote code execution
Yeah, like I said in my other comment, I'd misread which issues have been fixed. I still stand by point that for constant time you need to be close to the metal but I think we're in agreement there anyway.

I think using native code for the low-level implementation of the ciphers, padding etc. would be a good move from a security point of view and is the only way to get constant time implementation. As you say, there's nothing that prevents that in the design of Java.

richm44··on Vulnerability in Microsoft TLS library could allow remote code execution
"Right - it is looking more and more like truly constant time code can only be obtained by using hand written assembly or hardware. In that eventuality, I guess the core crypto code in the JVM will have to be changed to use hand written assembly as well, however, SSL is huge and most of it doesn't need to be constant time (certificate parsing, managing network buffers, message parsing etc). That is often where the bugs creep in."

I completely agree with you there. X.509 is a nightmare and it's not an area where constant time matters at all. Being resistant to buffer overruns and general logic errors is much more important there.

richm44··on Vulnerability in Microsoft TLS library could allow remote code execution
Sorry, I realised I'd failed to address your other point:

"What does that even mean? If you write your fail and success states to follow the same exact code paths (i.e. no branches, breaks, returns, or similar for failed) then you've created a "constant time" function."

Well, if you've got a JIT that is analysing which code actually executes, and no control over the optimisations then how do you achieve this? If the hotpath is normally the success condition for example then the JIT will optimise that more. The rare and more dangerous condition will be optimised less. If this happens of course will depend on the engine, but you can't control that without working at a much lower level than managed code offers.

richm44··on Vulnerability in Microsoft TLS library could allow remote code execution
Certainly. I was referring to this blog post, http://armoredbarista.blogspot.co.uk/2014/04/easter-hack-eve... however rereading it I see he was saying it was the ones in the hardware accelerators that haven't yet been fixed.
richm44··on Vulnerability in Microsoft TLS library could allow remote code execution
Sure. The JIT's code generator isn't attempting to make code constant time, it's designed for optimising for the common case. To make the code constant time you need to be very close to the metal (and even then you really need tools like ctgrind to make sure you've got it right). A JIT isn't the right tool for this particular job (nothing wrong with them for other things of course).
richm44··on Vulnerability in Microsoft TLS library could allow remote code execution
I'm saying they're unfixable because there's no way to tell the JIT to create constant-time code. Certainly Christopher Meyer has said that he's reported some that remain private since they've not been fixed.

Heartbleed was certainly easier to exploit, than a timing attack - no disagreement there. But the Java SSL stack is pretty flakey and largely seems to be unused. It has lots of interoperability problems with other implementations and generally seems immature. It's not something I'd trust in production myself.

richm44··on Vulnerability in Microsoft TLS library could allow remote code execution
You do realise that JSSE has lots of timing attacks etc. and that's pretty much unfixable in managed code? It's also had numerous bugs in it's SSL/TLS implementation (mainly because no one uses it) such as mishandling zero length extensions (used for flagging support for a feature), failing to handle DH params that aren't a multiple of 64 bits (no sane reason) etc.
← PreviousPage 2 of 3Next →