• Mikel Astiz's avatar
    Introduce new sync Cryptographer implementation · 5b4311c4
    Mikel Astiz authored
    The new class is a thin layer on top of NigoriKeyBag and introduces the
    notion of a default encryption key, central in the Cryptographer API.
    
    It has several advantages compared to the legacy DirectoryCryptographer:
    1. Very small API, which in particular excludes the historic quirks and
       design decisions at the sync protocol level and in terms of storage
       in prefs (i.e. bootstrap token).
    
    2. Separates the selection of the default encryption key to an explicit
       function call, which is also the only function that changes the
       default key, which is a privacy-sensitive operation.
    
    3. Does not have the notion of pending keys, which we intend to remove
       from the Cryptographer API, as per existing TODOs.
    
    Bug: 967417
    Change-Id: I2d49e047a14a0e2cfe949a7655d3fadd2498f31c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1824470
    Commit-Queue: Mikel Astiz <mastiz@chromium.org>
    Reviewed-by: default avatarMaksim Moskvitin <mmoskvitin@google.com>
    Cr-Commit-Position: refs/heads/master@{#699803}
    5b4311c4
cryptographer_impl.cc 4.02 KB