Hacker Newsnew | past | comments | ask | show | jobs | submit | more voidlogic's commentslogin

Also of note is having to terminate a single TCP/TLS connection per client vs one for every concurrent client request! Even if you are using a middle man like a CDN doing HTTP 1.1 pooling this is still reducing the established TCP/TLS connections by an order of magnitude or more.


This code should just call sha1.New(). If for some reason these allocations are a performance issue it is very simple to fix that will a little pooling:

    package main

    import (
        "crypto/sha1"
        "hash"
        "sync"
    )

    func main() {
        hasher := getHasher()
        defer poolHasher(hasher)
    }

    var hasherPool sync.Pool = sync.Pool{
        New: func() interface{} {
            return sha1.New()
        },
    }

    func getHasher() hash.Hash {
        return hasherPool.Get().(hash.Hash)
    }

    func poolHasher(hasher hash.Hash) {
        hasher.Reset()
        hasherPool.Put(hasher)
    }



>Unfortunately there’s no way to know that one currently has Lyme disease unless the symptoms are close in time to a tick bite.

I thought you could test for bacterial nuclear material in the blood?

Edit found it: Its a PCR Assay: https://www.ncbi.nlm.nih.gov/pubmed/26469112


IMHO they should either just adopt Dave Cheney's errors package (https://github.com/pkg/errors) into the standard library or leave it as it is becoming the de-facto standard.

The parallel reddit thread seems to agree too: https://www.reddit.com/r/golang/comments/biexq0/go_113_xerro...


Because this isn't nodejs.


>discover and purchase experience is abysmal.

  0. Home page
  1. Select product: https://puri.sm/products/
  2. View prod descs, select product: https://puri.sm/products/librem-13/
  3. Scroll down, view prod desc, click shop now
  4. At product configuration page: https://shop.puri.sm/shop/librem-13/
Seems pretty normal to me... now normal isn't "great" but abysmal is a bit strong.


Your criticism (outside of complexity) of the suggestion may be unfounded, consider:

  Client: asks server for nonce
  Server: sends nonce
  ---- OR ----
  Nonce arrives with login page

  Client: sends HMAC(nonce + HMAC(username + password + appname) + Unix Epoch rounded to last 5 min block))

  Server: 
  1. gets response
  2. using username as key pulls HMAC(username + password + appname) from DB
  3. Computes HMAC(last nonce sent to username + DB HMAC + Unix Epoch rounded to last 5 min block)) and compares to user token
  4. last nonce is cleared
This algorithm would have prevented the attack (only the client computed HMAC would be in the logs) and is not subject to replay.


To be fair what you're describing is a PAKE, which is substantially different from "merely" moving the key-derivation functionality of password hashing from the server to the client. They're categorically different things. But you're right - if you're going down the rabbit hole of client-side hashing, you might as well implement a PAKE instead.

This kind of gets to the heart of what I was referring to when I said client-side hashes are like faster horses rather than cars. If you're spending this much effort, a superior protocol is better than an unorthodox, modified one. SRP is a PAKE which basically takes your proposal and moves it into a different layer of abstraction (TLS), and OPAQUE makes improvements upon it which allow you to use elliptic curves[1]. There are other reasons not to use PAKEs, but they're a much more coherent and defensible suggestion than just bolting the key derivation system onto the client rather than the server.

______________________

1. https://blog.cryptographyengineering.com/2018/10/19/lets-tal...


This is the same as:

    Server sends nonce
    Client sends HMAC(nonce + password + time)
Your inner HMAC becomes the new password which now is stored in plaintext in the DB. You just call it something else.

There are better ways to implement this idea, like SRP/PAKE https://en.m.wikipedia.org/wiki/Secure_Remote_Password_proto...


Store kiosk?


All the more reason to make the client side send HMAC(HMAC(username + password) + Unix Epoch rounded to last 5 min block)) over the wire in its POST to the auth endpoint.

All the transport encryption and DB encryption/hashing/salting won't protect you from this kind of logging mistake, but the above would.

P.S. There are ways to make the above even better by adding a nonce that has to be requested from the server before POST etc.


Power. Soon CF will be completely pervasive. CDN? Certs? DNS? Registrar? The are playing the long game for the win.


With all the brexit challanges, why not have a new referendum to "confirm the will of the people"? It seems doubtful it would pass this time, crisis averted?

Also, doesn't brexit basically guarantee Scottish independence? The Scotts were way more opposed to brexit than the English in the brexit referendum and their most recent independence referendum stated as a condition of the delay until the next independence referendum that the UK's relationship with the EU did not change? Is that right?


With all the brexit challanges, why not have a new referendum to "confirm the will of the people"?

It's unclear whether or not it will be possible to construct majority support in parliament for that at present. There's also the issue of legitimacy; while I don't agree with the view myself, there is concern that a second referendum smacks of an attitude of "you did it wrong the first time, try again". This is the outcome of a badly-designed referendum, which should probably have included a ratification vote.

Also, doesn't brexit basically guarantee Scottish independence?

While I'm a huge Scottish independence fan and would love this to be the case, the reality on the ground is more complex. The case for the previous independence vote in 2014 was based heavily on continued EU membership for both Scotland and the rest of the UK. An unstable, hard-Brexit neighbour will be difficult for Scotland, which is heavily intertwined economically, culturally and politically with the rest of the UK. Brexit probably enhances the emotional case, but doesn't help the practical one. Additionally, due to the constitutional structure of the UK, Scotland cannot hold a legitimate referendum on independence without the consent of the UK parliament – something which is unlikely to be granted any time soon.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: