1. 08 Dec, 2015 1 commit
    • Adam Langley's avatar
      crypto/elliptic: resample private keys if out of range. · f740d717
      Adam Langley authored
      The orders of the curves in crypto/elliptic are all very close to a
      power of two. None the less, there is a tiny bias in the private key
      selection.
      
      This change makes the distribution uniform by resampling in the case
      that a private key is >= to the order of the curve. (It also switches
      from using BitSize to Params().N.BitLen() because, although they're the
      same value here, the latter is technically the correct thing to do.)
      
      The private key sampling and nonce sampling in crypto/ecdsa don't have
      this issue.
      
      Fixes #11082.
      
      Change-Id: Ie2aad563209a529fa1cab522abaf5fd505c7269a
      Reviewed-on: https://go-review.googlesource.com/17460Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      f740d717
  2. 07 Dec, 2015 14 commits
  3. 06 Dec, 2015 2 commits
  4. 05 Dec, 2015 19 commits
  5. 04 Dec, 2015 4 commits