HNHacker News
TopNewBestAskShowJobs

kevhito

685 karma · joined January 13, 2015

submissionscomments
kevhito··on Windows 10 S Will Not Support the Linux Subsystem
This is disingenuous. The report focuses on different browsers' ability to automatically detect and block URLs of phishing pages and malware downloads. All three browsers have some kind of automatic URL blocking, and this report claims that Edge is the best.

At a glance, the results don't look immediately credible to me: I didn't see an explanation of how they chose the specific URLs, why there is a difference between the browsers, or the false-positive rate. But the study is, at least, actually comparing browser "security", and isn't comparing user behavior or anything like that.

Disclosure: I've never used Edge.

kevhito··on How the wrong cat litter took down a nuclear waste repository
How about not sending a non-expert to the grocery store with a post-it note for supplies when packaging radioactive material for long-term storage. Besides, "organic" when in the grocery store means something completely different any way -- ironically, the organic (wheat-based) product could easily be "non-organic" (meaning not certified to avoid certain pesticides, fertilizers, etc.), while the non-organic (clay-based) product might be labeled "organic" (meaning no pesticides).

Really, how about having a specific written signoff procedure in place, where all supplies must be checked before purchase by a trained expert who knows the difference between organic and inorganic / clay vs wheat, signed off in writing against a checklist developed by experts, then checked again by a separate trained expert when delivered with another signoff, then checked again by a third export when actually used.

kevhito··on Collection of photographs of WannaCry infections from around the world
It's strange, many news organizations report this as "200,000 organizations", but others as "200,000 computers". Which are very different. Some of the bigger universities alone probably have hundreds to thousands of infected computers. I'd bet it's closer to 200k organizations, but I don't know how that would be measured or tracked.
kevhito··on Netem: linux network emulator
> ... but I could not find any good documentations on it.

Completely agree. I wanted to set up some simple traffic shaping on gcp and aws nodes my students will be using for some networking projects. I've used both netem and tc in the past, years ago, but I found the documentation still seems just as abysmal. The netem documentation in particular is impenetrable. It seems to sit at just the anti-sweet spot between being "low level", explaining in detail how the implementation actually accomplishes things, and "high level", explaining abstractions and concepts of how one might use the tool. The user is left with a mishmash of both, with no way to see how all the various extremely picky implementation details fit together into any kind of coherent usable system. In the end, I am left with the feeling that the code is probably a collection of hacks and spaghetti with no clear vision or goal of how anything works, and the documentation is just a reflection of that.

kevhito··on The Power of Prolog
It's no different than:

  public class LinkedList {
     ...
     public int size() {
        if (head == null) {
           return 0;
        } else {
           int n0 = 1 + head.size();
        }
    }
Actually, it is different. In prolog, you don't tell it how to compute an answer. You tell it what the answer is, and it figures out the rest.

In the previous example, I'd phrase it more like this:

I am sure [] has 0 length. I would be sure [_:Ls] has N length, if I was sure N>0 and N=N0+1 and [Ls] has N0 length.

Notice I never really told prolog how it is supposed to go about figuring out that [Ls] has N0 length -- prolog might use recursion. Or there might be other facts which let it figure out the length of [Ls]. Prolog will try to find a way. For example, I might introduce a rule

list_length(join(a, b), N) :- N #= NA + NB, list_length(a, NA), list_length(b, NB)

Now prolog knows that when you join two lists of known length, the lengths can be summed, without actually counting the length of either list or the combined list. And actually prolog doesn't even know or care what "join" means here, it just knows that "join" will cause the lengths to get summed.

kevhito··on Hackers Are Emptying ATMs with a Single Drilled Hole and $15 Worth of Gear
Well, that's why I said "mostly". The thing I need to protect, the key, is a very specific piece of data, which is used for one specific purpose, and I can take specific measures to prevent that secret from leaking. Everything from not writing it down, to key-sharing, to physical lock boxes with multiple locks, to offline-only storage, etc. It's much harder to do any of that with blueprints, since blueprints have competing needs -- they are no good if locked in a box most of the time.
kevhito··on Paradoxes of probability and other statistical strangeness
Alternate reality rules of the game are: nobody speaks, you pick any two doors you like, and you win the prize behind both of them. The odds of wining this game is obviously 2/3. Monty will gesture at you to point to a door. You point at the one you don't like. Monty will then show you one of your prizes behind one of your two chosen doors. Monty will then gesture for you to point to a door. You point at the remaining one you liked. Monty then gives you your second prize behind that door.

Notice that all of the externally visible actions are identical to the original game.

kevhito··on LastPass RCE vulnerability fixed
I was responding to your nonsense advice that 12+ character random ASCII is somehow better or more secure than a "correct horse battery staple" or diceware-style password. They have identical security properties, given appropriate choice of N.

If you are going to memorize passwords, feel free to memorize ASCII gibberish if that's what you are into. Or memorize random phrases, since many (most?) humans find those easier to remember.

kevhito··on Hackers Are Emptying ATMs with a Single Drilled Hole and $15 Worth of Gear
> It's a false dichotomy.

What part of the parent are you responding to here?

> Your private keys are just "obscure" information that requires some effort to find too.

I think this is highly misleading. There is nothing "just" or "some" about it. Your private keys are "obscured" information that requires a (mostly) specific and quantifiably very large amount of effort to find, and which if it were to become exposed, can be changed without requiring any new design to restore security.

Blueprints and wiring diagrams are "barely if at all obscured" information that requires vague, hard-to-quantify, and often trivially little amount of effort to find, and if exposed, can't be easily changed without requiring entirely new designs, manufacturing, and engineering.

kevhito··on LastPass RCE vulnerability fixed
Please don't give security advice unless you know what you are talking about. It just spreads misinformation.
kevhito··on Overkill: Java as a first programming language (2010)
Well then your instructor was doing it wrong, and that's a shame. I teach this course regularly, in Java (and previously in C++).

Week 1: "it's just some magic, don't worry about it"

Week 2: arrays are a thing, hey look, args is an array of strings!

Week 3: functions are a thing, hey look, "void" is the return type, args is the parameter!

Week 8: objects are a thing, hey look, static mean's it's not a member of an object

Week 9: software engineering is a thing, hey look, public is an access modifier

kevhito··on Changes I would make to Go
Go has "defer", which is great. Perhaps it should have a similar "whenever" construct.

    val, err := foo()
    if err != nil
        return err
    vee, err := bar()
    if err != nil
        return err
Would become:

    var err error
    whenever err != nil
        return err
    val, err := foo()
    vee, err := bar()
Static analysis would insert the appropriate check any time err is assigned in the function. Aliasing might be a gotcha, but I'd bet that is a rare case and static escape analysis could maybe catch it and either error, or just insert extra checks.
kevhito··on Stocks are up but 80% of the value is held by the richest 10%
I don't really understand your comment.

> Most investors have poor returns because they defer to their self-defeating cognitive biases, they don't take the time to understand investing, and they often naively believe they have a simple "system" which will outsmart the market.

The article you cite directly contradicts this. It claims that investors who have the best returns are those who specifically don't take the time to understand investing, and that there very much is a simple "system" that works, namely, forget about your investment account entirely, or at least let it sit dormant for a few decades and do nothing.

More to the point, your comment smells like justifying the wealth disparities, and counters the WP article ("If you start out with wealth, you don’t have to be a financial genius to tap the miracle of compounding and end up with real money.") with... nothing but a vague claim that smart investors can make a lot of money.

kevhito··on Cmd/compile: Go 1.8 regression: sync/atomic loop elided
So you are telling me a valid optimization for Go is to elide the entire contents of all goroutines?

And by that argument, since main() itself is an implicitly-called goroutine (so far as I know), then the compiler can elide the entire contents of main() too, and then the rest of the contents of the program.

</reductio-ad-absurdum>

kevhito··on Cmd/compile: Go 1.8 regression: sync/atomic loop elided
I don't understand. By your argument, and some of the replies, because "you're not guaranteed a goroutine will run at any particular time", the compiler is free to elide any suffix of a goroutine's code, even if that code has visible side effects.

I think there is something more specific to atomic going on here, where the same kinds of optimizations are already forbidden for other kinds of visible side effects like printing.

kevhito··on Adventures in /usr/bin and the likes
I was tempted to poke a little fun at you for having trouble with sed -- among my peers, 's/foo/bar/g' used pretty much daily, even just in informal emails/conversations.

But I'm glad I looked at the list first, because I found this wonder: `lstopo --of txt`. I'm going to use this in class next week, I can't believe I've never seen that before.

kevhito··on Proposal: Monotonic Elapsed Time Measurements in Go
> someone out there has made assumptions which will now be invalid

I was thinking about this as well, but I think the key is that they guarantee only the semantics that are _documented_. If you make assumptions beyond the documentation, then no, of course they can't guarantee compatibility, otherwise it would essentially forbid any changes whatsoever. Still, it is a good thing the Go team takes the extra step to ensure that even changes that fall inside their compatibility promise are _still_ vetted against a vast body of real-world code, and to check that common (non-documented) assumptions won't be violated if they can help it.

kevhito··on Proposal: Monotonic Elapsed Time Measurements in Go
> there is a deterministic formula for converting monotonic clock time to wall clock time

I think "deterministic" is not really right here, since you can only convert monotonic times in the past, not the future, and only after you have been given the (completely arbitrary) leap second data. If you call that "deterministic", then what isn't?

> The proposed solution here is to treat them as completely separate

Did you read the proposal? Because the Go folks are essentially trying to present a single, unified API for both, whereas lots of comments here on HN are suggesting the separate-API approach instead. Also, the Go folks specifically call out Google's efforts to eliminate the leap second problem from their systems and how/why it hasn't caught on outside of the big players. Can you compare your proposal to Google's time handling solution? Does it suffer the same problems mentioned in the the post?

kevhito··on UDP vs TCP
> ship all the chunks over with a sequential number

Except that if you ship them too fast, they will at best simply build up in a buffer somewhere (e.g. near a bottleneck link), or more likely they will overflow causing many of your packets to be lost. So not only did the recipient not get them (and you have to figure this out and resend them later), but you also wasted a bunch of resources sending packets only to have them dropped.

And if you send them too slow, you are leaving some potential capacity on the table. So you need to send them fast, but not too fast.

So you add some additional logic to implement flow control and congestion control. And that's TCP, pretty much.

kevhito··on Insecam: Large Directory of Unsecure Cameras
I've had one for about 6 months that I use for gmail. I like it, easy to set up, works pretty much out of the box, security story seems reasonable, and device is physically pretty sturdy so far.

For at least 2 linux boxes I use, I needed to add udev rules for the yubikey. That wasn't immediately obvious and took a few minutes to figure out why it wasn't working.

kevhito··on Why I Regret Making My House a Smart-House (2013)
> reliability (1 million switchings without hiccup?)

That's about 20 cycles ("switchings") per day for 150 years. I was curious so I tried to look up reliability/endurance ratings. For a fairly durable-looking "heavy duty" industrial switch [1], it lists only 50k cycles as it's minimum endurance rating.

[1]: http://www.leviton.com/OA_HTML/ibcGetAttachment.jsp?cItemId=...

kevhito··on Votebook – A proposal for a blockchain-based electronic voting system [pdf]
It sounds to me like you would like to be a representative on your local city council, or a town board. Why not run for election? Then you can do everything you mentioned.

In principle, frequent voting might sound nice. But I don't know if it really would be in practice. (I'm not arguing a position here, just thinking out loud.) I'm not really interested in most politics, I don't really feel qualified, or compelled to become qualified, to deal with a lot of the questions that come up. I'm pretty happy to instead vote for a person (or even just a party) to represent me in most cases. I don't want to propose policies.

Lots of people in my town are retired and/or seem to have endless time and energy to devote to meddling in town business. It would be exhausting if I had to keep constant vigilance every few weeks or months to make sure these people can't enact policies, rather than just voting every few years to make sure they don't get into office.

kevhito··on Rust: 128 bit integers preparing to be released
Oh, just found this:

> The Duration type could be simplified with this: instead of using a u64 for seconds with a seperate u32 for nanoseconds, it could just be a single u128/i128 count of nanoseconds.

Of course, just a single u64 at ns precision would get you 500+ years of range. But ok.

kevhito··on Rust: 128 bit integers preparing to be released
I wasn't able to find any real justification beyond (a) one vague mention of "some algorithms... such as certain cryptographic algorithms" and (b) the fact that clang supports it. Can you point to something more specific? Justification (b) in particular smells bad to me.
kevhito··on Why I don't like smartcards, HSMs, YubiKeys, etc.
This is a somewhat older rant (at least 2015, I think). And the title is misleading. It is really "Why I wish there were a product similar to but different than smartcards, HSMs, YubiKeys, etc." Because there isn't much in there that argues why smartcards (or yubikeys, etc.) are not good at what they do. The author just wants a different thing, and doesn't understand why this fantasy product doesn't exist.
kevhito··on NIST’s new password rules – what you need to know
Yes, 2048 is tiny. I've been using a 4096-word dictionary I found online for years, along with my family and two kids since they were about 6 years old. There is absolutely no trouble with a 4096 word dictionary. Yes, they (and me too) sometimes bump into words we don't recognize, but it's not that common.

Here, I just generated you a few passwords:

* hefty march attempt force bowel scuff

* between sepia book sweat lemma saint

* safe warn magical cask hefty wish

* alum glib puck adieu dour lazy

* telephone pine cavort good knee swank

* numeral plan jewel conch slate tube

* pastry piano sure proxy unit brew

* trig rise taint current sans gallop

Here is the same random numbers but encoded into ascii instead of words:

* 81Pk3t?Rq6S}

* ]CPcYrT^?iE3

* +qV`J9ZU&.,C

* `>sp=~V);3g>

* E&_ff7a|Z4B[

* ?OX~[J>0K'S*

These each have the exact same amount of entropy as the word-based ones.

kevhito··on NIST’s new password rules – what you need to know
Everything in the article is spot on, I only wish they went further and recommended passphrases more strongly. It's correct horse battery staple and all that.

As for your calculation, you are about right. Except memorizing a completely random 8 character password drawn from an 80 symbol alphabet is /extremely/ unpleasant for most people, especially when you may have a few different passwords you use on a daily or weekly basis. And for passphrases, 6 words drawn from a 4096-word dictionary is typical. I use that setting (or even 8 words for more important things) and have easily memorized about a dozen passwords, even ones I use only once every few weeks.

40966 = 4.7e21, about the same as an 11-character random password.

kevhito··on Go fonts
I help maintain/develop an app that allows users to draw and simulate logic circuits on a canvas. Text plays a minor but important role for labeling various components, showing bit and hex values, etc. The app uses system fonts, and it's a huge mistake. The sizes and exact layout and connectivity of various logic blocks depends on text size, and when that changes (and it does from platform to platform), it leads to lots of subtle and hard to notice errors. I've spent a lot of time tracking down every logic dependence on character width and making those all platform-independent heuristics instead of using the actual font metrics. Which makes the UI often look terrible (but at least it is a consistent and functionally correct terrible). I would much rather the app bundle a freely redistributable font and be done with it.
kevhito··on Shazam Keeps Your Mac’s Microphone Always On, Even When You Turn It Off
> Switches are very simple devices. If the switch mechanism is not enclosed, ...

Sarcasm, I hope? I spent an hour this weekend replacing some micro switches in some decrepit robots. These are about 5mm^3, which is pretty tiny, but huge on the scale of a modern phone. They are basically hunks of plastic with a button on one side and six or so leads coming out the other side. No, you can't open them up and see the air gap without destroying them. And yes, they are small enough to easily contain a full CPU, some flash memory, and a few sensors, even though they only really need a few sliding metal and plastic bits.

kevhito··on PayPal 2FA Bypass
Irrelevant. It works fine for passwords too. The security of "correct horse battery staple" method is (nearly) optimally resistant to GPU (or any other) brute force attack.
← PreviousPage 3 of 5Next →