1. 04 Jan, 2017 1 commit
    • davidben's avatar
      Remove the password parameter for ECPrivateKey::ExportEncryptedPrivateKey. · 1c02c94c
      davidben authored
      Even with a password, the encryption scheme used here is really not what
      we'd want people to use. This does two things:
      
      1. Cut down on the number of ways to use ExportEncryptedPrivateKey and
         makes it less likely someone will mistakenly use it for security
         purposes.
      
      2. When we ported to BoringSSL, we added "raw" versions of
         PKCS8_{encrypt,decrypt} to account for confusion about two ways to
         encode the empty password. But PKCS8_{encrypt,decrypt} already
         handled this by treating NULL and "" differently. Limiting to just
         the empty password lets us trim BoringSSL's API surface in
         preparation for decoupling it from crypto/asn1.
      
      BUG=603319
      
      Review-Url: https://codereview.chromium.org/2608453002
      Cr-Commit-Position: refs/heads/master@{#441365}
      1c02c94c
  2. 08 Apr, 2016 1 commit
  3. 03 Mar, 2016 1 commit
    • davidben's avatar
      Switch SignatureVerifier to taking an algorithm enum. · 9c97a36e
      davidben authored
      The existing API and implementation were problematic for several reasons.
      
      - It is very unclear what algorithms were supported.
      
      - Everyone was using it as an enum anyway, but it required copy-and-pasting
        giant strings all over the codebase.
      
      - The API is dangerous. Anyone not using it as an enum (i.e. taking an
        AlgorithmIdentifier from another source) opens themselves up to accepting any
        random algorithm and parameters the underlying implementation knew how to
        parse.
      
      - It relies on EVP_get_digestbyobj extracting the hash for RSA-PKCS1-FOO
        signature OIDs. This is weird and, for EVP_get_digestbyobj, Chromium appears
        to be one of the only two consumers still relying on this. This is a
        remnant of OpenSSL's old EVP_Sign* APIs.
      
      - The old EVP_get_digestbyobj implementation failed to check that ECDSA
        public keys weren't used for an RSA algorithm, etc.
      
      - The old EVP_get_digestbyobj implementation happily accepted OIDs for hashes
        as signature algorithm OIDs.
      
      This removes a use of openssl/x509.h from //crypto.
      
      BUG=499653
      
      Review URL: https://codereview.chromium.org/1679873005
      
      Cr-Commit-Position: refs/heads/master@{#379014}
      9c97a36e
  4. 21 Dec, 2015 1 commit
  5. 25 Oct, 2013 1 commit
  6. 03 Jul, 2013 1 commit
  7. 09 Apr, 2013 3 commits
  8. 19 Sep, 2012 1 commit
  9. 28 Feb, 2012 1 commit
  10. 25 Jan, 2012 1 commit