• Kevin Jacobs's avatar
    Bug 1678398 - Add Export/Import functions for HPKE context. r=mt · 10afb436
    Kevin Jacobs authored
    This patch adds and exports two new HPKE functions: `PK11_HPKE_ExportContext` and
    `PK11_HPKE_ImportContext`, which are used to export a serialized HPKE context,
    then later reimport that context and resume Open and Export operations. Only receiver
    contexts are currently supported for export (see the rationale in pk11pub.h).
    One other change introduced here is that `PK11_HPKE_GetEncapPubKey` now works as
    expected on the receiver side.
    If the `wrapKey` argument is provided to the Export/Import functions, then the
    symmetric keys are wrapped with AES Key Wrap with Padding (SP800-38F, 6.3)
    prior to serialization.
    Differential Revision: https://phabricator.services.mozilla.com/D99277
    extra : moz-landing-system : lando
pk11hpke.c 43.9 KB