summaryrefslogtreecommitdiff
path: root/lib/nss
diff options
context:
space:
mode:
authorKevin Jacobs <kjacobs@mozilla.com>2021-01-25 17:39:56 +0000
committerKevin Jacobs <kjacobs@mozilla.com>2021-01-25 17:39:56 +0000
commite7e4a4a881bc28422834df5b5370a35cf21ba149 (patch)
treec0f02c171114fbabdb47cb31bfcbddf1aa37c3f2 /lib/nss
parentddc9d5dd387672585d52dbf326b40c9ed00ed671 (diff)
downloadnss-hg-e7e4a4a881bc28422834df5b5370a35cf21ba149.tar.gz
Bug 1678398 - Add Export/Import functions for HPKE context. r=mt
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
Diffstat (limited to 'lib/nss')
-rw-r--r--lib/nss/nss.def7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/nss/nss.def b/lib/nss/nss.def
index 5ad688b4e..db912e1ec 100644
--- a/lib/nss/nss.def
+++ b/lib/nss/nss.def
@@ -1213,3 +1213,10 @@ PK11_PubUnwrapSymKeyWithMechanism;
;+ local:
;+ *;
;+};
+;+NSS_3.62 { # NSS 3.62 release
+;+ global:
+PK11_HPKE_ExportContext;
+PK11_HPKE_ImportContext;
+;+ local:
+;+ *;
+;+}; \ No newline at end of file