hpke 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -19
- package/index.d.ts +133 -90
- package/index.d.ts.map +1 -1
- package/index.js +301 -253
- package/index.ts +389 -341
- package/package.json +12 -11
package/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* asymmetric key exchange with a symmetric cipher. This was originally defined in an Informational
|
|
6
6
|
* document on the IRTF stream as [RFC 9180](https://www.rfc-editor.org/rfc/rfc9180.html) and is now
|
|
7
7
|
* being republished as a Standards Track document of the IETF as
|
|
8
|
-
* [draft-ietf-hpke-hpke](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
8
|
+
* [draft-ietf-hpke-hpke](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06).
|
|
9
9
|
*
|
|
10
10
|
* HPKE provides a variant of public key encryption for arbitrary-sized plaintexts using a recipient
|
|
11
11
|
* public key.
|
|
@@ -96,7 +96,7 @@ declare class SenderContext {
|
|
|
96
96
|
*
|
|
97
97
|
* @returns A Promise that resolves to the ciphertext. The ciphertext is {@link Nt} bytes longer
|
|
98
98
|
* than the plaintext.
|
|
99
|
-
* @see [Context.Seal](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
99
|
+
* @see [Context.Seal](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-5.2)
|
|
100
100
|
*/
|
|
101
101
|
Seal(plaintext: Uint8Array, aad?: Uint8Array): Promise<Uint8Array>;
|
|
102
102
|
/**
|
|
@@ -104,6 +104,11 @@ declare class SenderContext {
|
|
|
104
104
|
*
|
|
105
105
|
* The exported secret is indistinguishable from a uniformly random bitstring of equal length.
|
|
106
106
|
*
|
|
107
|
+
* HPKE does not provide replay protection. A replayed encapsulated secret produces the same
|
|
108
|
+
* exported secrets. Applications must only use these secrets where repeated values are safe.
|
|
109
|
+
* Deriving AEAD keys and nonces requires a fresh value for each derivation, such as a
|
|
110
|
+
* recipient-provided nonce.
|
|
111
|
+
*
|
|
107
112
|
|
|
108
113
|
|
|
109
114
|
|
|
@@ -120,7 +125,7 @@ declare class SenderContext {
|
|
|
120
125
|
* @param length - Desired length of exported secret in bytes
|
|
121
126
|
*
|
|
122
127
|
* @returns A Promise that resolves to the exported secret.
|
|
123
|
-
* @see [Context.Export](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
128
|
+
* @see [Context.Export](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-5.3)
|
|
124
129
|
*/
|
|
125
130
|
Export(exporterContext: Uint8Array, length: number): Promise<Uint8Array>;
|
|
126
131
|
/**
|
|
@@ -190,7 +195,7 @@ declare class RecipientContext {
|
|
|
190
195
|
* @param aad - Additional authenticated data
|
|
191
196
|
*
|
|
192
197
|
* @returns A Promise that resolves to the decrypted plaintext.
|
|
193
|
-
* @see [Context.Open](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
198
|
+
* @see [Context.Open](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-5.2)
|
|
194
199
|
*/
|
|
195
200
|
Open(ciphertext: Uint8Array, aad?: Uint8Array): Promise<Uint8Array>;
|
|
196
201
|
/**
|
|
@@ -198,6 +203,11 @@ declare class RecipientContext {
|
|
|
198
203
|
*
|
|
199
204
|
* The exported secret is indistinguishable from a uniformly random bitstring of equal length.
|
|
200
205
|
*
|
|
206
|
+
* HPKE does not provide replay protection. A replayed encapsulated secret produces the same
|
|
207
|
+
* exported secrets. Applications must only use these secrets where repeated values are safe.
|
|
208
|
+
* Deriving AEAD keys and nonces requires a fresh value for each derivation, such as a
|
|
209
|
+
* recipient-provided nonce.
|
|
210
|
+
*
|
|
201
211
|
|
|
202
212
|
|
|
203
213
|
|
|
@@ -214,7 +224,7 @@ declare class RecipientContext {
|
|
|
214
224
|
* @param length - Desired length of exported secret in bytes
|
|
215
225
|
*
|
|
216
226
|
* @returns A Promise that resolves to the exported secret.
|
|
217
|
-
* @see [Context.Export](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
227
|
+
* @see [Context.Export](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-5.3)
|
|
218
228
|
*/
|
|
219
229
|
Export(exporterContext: Uint8Array, length: number): Promise<Uint8Array>;
|
|
220
230
|
}
|
|
@@ -226,7 +236,7 @@ export type { RecipientContext };
|
|
|
226
236
|
* asymmetric key exchange with a symmetric cipher. This was originally defined in an Informational
|
|
227
237
|
* document on the IRTF stream as [RFC 9180](https://www.rfc-editor.org/rfc/rfc9180.html) and is now
|
|
228
238
|
* being republished as a Standards Track document of the IETF as
|
|
229
|
-
* [draft-ietf-hpke-hpke](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
239
|
+
* [draft-ietf-hpke-hpke](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06).
|
|
230
240
|
*
|
|
231
241
|
* HPKE provides a variant of public key encryption for arbitrary-sized plaintexts using a recipient
|
|
232
242
|
* public key. It supports two modes:
|
|
@@ -296,12 +306,12 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
296
306
|
|
|
297
307
|
|
|
298
308
|
|
|
299
|
-
* @param KEM - KEM implementation factory. Must return an object conforming to the
|
|
300
|
-
* interface.
|
|
301
|
-
* @param KDF - KDF implementation factory. Must return an object conforming to the
|
|
302
|
-
* interface.
|
|
303
|
-
* @param AEAD - AEAD implementation factory. Must return an object conforming to the
|
|
304
|
-
* interface.
|
|
309
|
+
* @param KEM - KEM implementation factory. Must return an object conforming to the
|
|
310
|
+
* {@link !KEM KEM} interface.
|
|
311
|
+
* @param KDF - KDF implementation factory. Must return an object conforming to the
|
|
312
|
+
* {@link !KDF KDF} interface.
|
|
313
|
+
* @param AEAD - AEAD implementation factory. Must return an object conforming to the
|
|
314
|
+
* {@link !AEAD AEAD} interface.
|
|
305
315
|
* @see {@link KEMFactory Available KEMs}
|
|
306
316
|
* @see {@link KDFFactory Available KDFs}
|
|
307
317
|
* @see {@link AEADFactory Available AEADs}
|
|
@@ -489,10 +499,12 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
489
499
|
* Single-shot API for encrypting a single message. It combines context setup and encryption in
|
|
490
500
|
* one call.
|
|
491
501
|
*
|
|
492
|
-
*
|
|
502
|
+
* Applications should prefer `options.info` for authenticated information that applies to the
|
|
503
|
+
* whole context, reserving `options.aad` for information specific to the message.
|
|
493
504
|
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
505
|
+
* Omitted PSK options default to empty byte arrays. When `psk` and `pskId` are both empty, the
|
|
506
|
+
* suite uses unauthenticated Base mode. PSK mode requires a `psk` of at least 32 bytes and a
|
|
507
|
+
* nonempty `pskId`.
|
|
496
508
|
*
|
|
497
509
|
* @category Single-Shot APIs
|
|
498
510
|
|
|
@@ -517,7 +529,8 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
517
529
|
* @returns A Promise that resolves to an object containing the encapsulated secret and
|
|
518
530
|
* ciphertext. The ciphertext is {@link CipherSuite.AEAD Nt} bytes longer than the plaintext. The
|
|
519
531
|
* encapsulated secret is {@link CipherSuite.KEM Nenc} bytes.
|
|
520
|
-
* @see [Single-Shot Encryption](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
532
|
+
* @see [Single-Shot Encryption](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-6.1)
|
|
533
|
+
* @see [Auxiliary Authenticated Application Information](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-8.1)
|
|
521
534
|
*/
|
|
522
535
|
Seal(publicKey: K, plaintext: Uint8Array, options?: {
|
|
523
536
|
aad?: Uint8Array;
|
|
@@ -533,10 +546,12 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
533
546
|
*
|
|
534
547
|
* It combines context setup and decryption in one call.
|
|
535
548
|
*
|
|
536
|
-
*
|
|
549
|
+
* Applications should prefer `options.info` for authenticated information that applies to the
|
|
550
|
+
* whole context, reserving `options.aad` for information specific to the message.
|
|
537
551
|
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
552
|
+
* Omitted PSK options default to empty byte arrays. When `psk` and `pskId` are both empty, the
|
|
553
|
+
* suite uses unauthenticated Base mode. PSK mode requires a `psk` of at least 32 bytes and a
|
|
554
|
+
* nonempty `pskId`.
|
|
540
555
|
*
|
|
541
556
|
* @category Single-Shot APIs
|
|
542
557
|
|
|
@@ -562,7 +577,8 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
562
577
|
* @param options.pskId - Pre-shared key identifier (for PSK mode)
|
|
563
578
|
*
|
|
564
579
|
* @returns A Promise that resolves to the decrypted plaintext.
|
|
565
|
-
* @see [Single-Shot Decryption](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
580
|
+
* @see [Single-Shot Decryption](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-6.1)
|
|
581
|
+
* @see [Auxiliary Authenticated Application Information](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-8.1)
|
|
566
582
|
*/
|
|
567
583
|
Open(privateKey: K | KeyPair<K>, encapsulatedSecret: Uint8Array, ciphertext: Uint8Array, options?: {
|
|
568
584
|
aad?: Uint8Array;
|
|
@@ -575,8 +591,20 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
575
591
|
*
|
|
576
592
|
* It combines context setup and secret export in one call.
|
|
577
593
|
*
|
|
594
|
+
* Omitted PSK options default to empty byte arrays. When `psk` and `pskId` are both empty, the
|
|
595
|
+
* suite uses unauthenticated Base mode. PSK mode requires a `psk` of at least 32 bytes and a
|
|
596
|
+
* nonempty `pskId`.
|
|
597
|
+
*
|
|
598
|
+
* Applications should prefer `options.info` for authenticated information that applies to the
|
|
599
|
+
* whole context, reserving `exporterContext` for information specific to the exported secret.
|
|
600
|
+
*
|
|
578
601
|
* The exported secret is indistinguishable from a uniformly random bitstring of equal length.
|
|
579
602
|
*
|
|
603
|
+
* HPKE does not provide replay protection. A replayed encapsulated secret produces the same
|
|
604
|
+
* exported secrets. Applications must only use these secrets where repeated values are safe.
|
|
605
|
+
* Deriving AEAD keys and nonces requires a fresh value for each derivation, such as a
|
|
606
|
+
* recipient-provided nonce.
|
|
607
|
+
*
|
|
580
608
|
* @category Single-Shot APIs
|
|
581
609
|
|
|
582
610
|
|
|
@@ -603,7 +631,8 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
603
631
|
*
|
|
604
632
|
* @returns A Promise that resolves to an object containing the encapsulated secret and the
|
|
605
633
|
* exported secret.
|
|
606
|
-
* @see [Single-Shot Secret Export](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
634
|
+
* @see [Single-Shot Secret Export](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-6.2)
|
|
635
|
+
* @see [Auxiliary Authenticated Application Information](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-8.1)
|
|
607
636
|
*/
|
|
608
637
|
SendExport(publicKey: K, exporterContext: Uint8Array, length: number, options?: {
|
|
609
638
|
info?: Uint8Array;
|
|
@@ -618,6 +647,18 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
618
647
|
*
|
|
619
648
|
* It combines context setup and secret export in one call.
|
|
620
649
|
*
|
|
650
|
+
* Omitted PSK options default to empty byte arrays. When `psk` and `pskId` are both empty, the
|
|
651
|
+
* suite uses unauthenticated Base mode. PSK mode requires a `psk` of at least 32 bytes and a
|
|
652
|
+
* nonempty `pskId`.
|
|
653
|
+
*
|
|
654
|
+
* Applications should prefer `options.info` for authenticated information that applies to the
|
|
655
|
+
* whole context, reserving `exporterContext` for information specific to the exported secret.
|
|
656
|
+
*
|
|
657
|
+
* HPKE does not provide replay protection. A replayed encapsulated secret produces the same
|
|
658
|
+
* exported secrets. Applications must only use these secrets where repeated values are safe.
|
|
659
|
+
* Deriving AEAD keys and nonces requires a fresh value for each derivation, such as a
|
|
660
|
+
* recipient-provided nonce.
|
|
661
|
+
*
|
|
621
662
|
* @category Single-Shot APIs
|
|
622
663
|
|
|
623
664
|
|
|
@@ -648,7 +689,8 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
648
689
|
* @param options.pskId - Pre-shared key identifier (for PSK mode)
|
|
649
690
|
*
|
|
650
691
|
* @returns A Promise that resolves to the exported secret.
|
|
651
|
-
* @see [Single-Shot Secret Export](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
692
|
+
* @see [Single-Shot Secret Export](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-6.2)
|
|
693
|
+
* @see [Auxiliary Authenticated Application Information](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-8.1)
|
|
652
694
|
*/
|
|
653
695
|
ReceiveExport(privateKey: K | KeyPair<K>, encapsulatedSecret: Uint8Array, exporterContext: Uint8Array, length: number, options?: {
|
|
654
696
|
info?: Uint8Array;
|
|
@@ -661,10 +703,9 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
661
703
|
* Creates a context that can be used to encrypt multiple messages to the same recipient,
|
|
662
704
|
* amortizing the cost of the public key operations.
|
|
663
705
|
*
|
|
664
|
-
*
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
* - If the options `psk` and `pskId` are provided: PSK mode (authenticated with pre-shared key)
|
|
706
|
+
* Omitted PSK options default to empty byte arrays. When `psk` and `pskId` are both empty, the
|
|
707
|
+
* suite uses unauthenticated Base mode. PSK mode requires a `psk` of at least 32 bytes and a
|
|
708
|
+
* nonempty `pskId`.
|
|
668
709
|
*
|
|
669
710
|
* The returned context maintains a sequence number that increments with each encryption, ensuring
|
|
670
711
|
* nonce uniqueness.
|
|
@@ -696,7 +737,7 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
696
737
|
*
|
|
697
738
|
* @returns A Promise that resolves to an object containing the encapsulated secret and the sender
|
|
698
739
|
* context (`ctx`). The encapsulated secret is {@link CipherSuite.KEM Nenc} bytes.
|
|
699
|
-
* @see [SetupBaseS / SetupPSKS](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
740
|
+
* @see [SetupBaseS / SetupPSKS](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-5.1.1)
|
|
700
741
|
*/
|
|
701
742
|
SetupSender(publicKey: K, options?: {
|
|
702
743
|
info?: Uint8Array;
|
|
@@ -711,10 +752,9 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
711
752
|
*
|
|
712
753
|
* Creates a context that can be used to decrypt multiple messages from the same sender.
|
|
713
754
|
*
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
*
|
|
717
|
-
* - If the options `psk` and `pskId` are provided: PSK mode (authenticated with pre-shared key)
|
|
755
|
+
* Omitted PSK options default to empty byte arrays. When `psk` and `pskId` are both empty, the
|
|
756
|
+
* suite uses unauthenticated Base mode. PSK mode requires a `psk` of at least 32 bytes and a
|
|
757
|
+
* nonempty `pskId`.
|
|
718
758
|
*
|
|
719
759
|
* @category Encryption Context
|
|
720
760
|
|
|
@@ -752,7 +792,7 @@ export declare class CipherSuite<K extends Key = Key> {
|
|
|
752
792
|
* @param options.pskId - Pre-shared key identifier (for PSK mode)
|
|
753
793
|
*
|
|
754
794
|
* @returns A Promise that resolves to the recipient context.
|
|
755
|
-
* @see [SetupBaseR / SetupPSKR](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
795
|
+
* @see [SetupBaseR / SetupPSKR](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-5.1.1)
|
|
756
796
|
*/
|
|
757
797
|
SetupRecipient(privateKey: K | KeyPair<K>, encapsulatedSecret: Uint8Array, options?: {
|
|
758
798
|
info?: Uint8Array;
|
|
@@ -860,7 +900,7 @@ interface Triple<K extends Key = Key> {
|
|
|
860
900
|
* Base mode provides encryption to a public key without sender authentication. The recipient cannot
|
|
861
901
|
* verify who encrypted the message, only that someone with access to their public key did.
|
|
862
902
|
*
|
|
863
|
-
* @see [HPKE Modes](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
903
|
+
* @see [HPKE Modes](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-5)
|
|
864
904
|
*/
|
|
865
905
|
export declare const MODE_BASE = 0;
|
|
866
906
|
/**
|
|
@@ -870,7 +910,7 @@ export declare const MODE_BASE = 0;
|
|
|
870
910
|
* sender and recipient must possess the same PSK and PSK ID. This provides implicit sender
|
|
871
911
|
* authentication.
|
|
872
912
|
*
|
|
873
|
-
* @see [HPKE Modes](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
913
|
+
* @see [HPKE Modes](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-5)
|
|
874
914
|
*/
|
|
875
915
|
export declare const MODE_PSK = 1;
|
|
876
916
|
/** Mode supported by this implementation. */
|
|
@@ -1048,25 +1088,18 @@ export declare function concat(...buffers: Uint8Array[]): Uint8Array;
|
|
|
1048
1088
|
*/
|
|
1049
1089
|
export declare function encode(string: string): Uint8Array;
|
|
1050
1090
|
/**
|
|
1051
|
-
*
|
|
1052
|
-
*
|
|
1053
|
-
*
|
|
1054
|
-
* use with one-stage KDFs. It constructs a labeled input by concatenating:
|
|
1055
|
-
*
|
|
1056
|
-
* - The input keying material (`ikm`)
|
|
1057
|
-
* - The version string "HPKE-v1"
|
|
1058
|
-
* - The suite identifier (`suite_id`)
|
|
1059
|
-
* - A length-prefixed label
|
|
1060
|
-
* - The desired output length as a 2-byte encoding
|
|
1061
|
-
* - Additional context
|
|
1091
|
+
* Integer to Octet String Primitive (I2OSP) as defined in RFC 8017. Converts a non-negative integer
|
|
1092
|
+
* into a byte string of specified length. It's exported for use in custom KEM, KDF, or AEAD
|
|
1093
|
+
* implementations.
|
|
1062
1094
|
*
|
|
1063
|
-
*
|
|
1064
|
-
*
|
|
1095
|
+
* @param n - Non-negative safe integer to convert
|
|
1096
|
+
* @param w - Desired length of output in bytes
|
|
1065
1097
|
*
|
|
1098
|
+
* @returns A Uint8Array of length w containing the big-endian representation of n
|
|
1066
1099
|
* @group Utilities
|
|
1067
|
-
* @see [
|
|
1100
|
+
* @see [I2OSP](https://www.rfc-editor.org/rfc/rfc8017#section-4.1)
|
|
1068
1101
|
*/
|
|
1069
|
-
export declare function
|
|
1102
|
+
export declare function I2OSP(n: number, w: number): Uint8Array;
|
|
1070
1103
|
/**
|
|
1071
1104
|
* Key Derivation Function (KDF) implementation interface.
|
|
1072
1105
|
*
|
|
@@ -1086,6 +1119,9 @@ export declare function LabeledDerive(KDF: Pick<KDF, 'Derive'>, suite_id: Uint8A
|
|
|
1086
1119
|
* - Two-stage KDFs only implement {@link Extract} and {@link Expand}. The {@link Derive} method will not
|
|
1087
1120
|
* be called and may be a no-op implementation.
|
|
1088
1121
|
*
|
|
1122
|
+
* Custom KDF implementations must also meet the [KDF security
|
|
1123
|
+
* requirements](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-9.3).
|
|
1124
|
+
*
|
|
1089
1125
|
|
|
1090
1126
|
|
|
1091
1127
|
|
|
@@ -1132,7 +1168,7 @@ export declare function LabeledDerive(KDF: Pick<KDF, 'Derive'>, suite_id: Uint8A
|
|
|
1132
1168
|
|
|
1133
1169
|
|
|
1134
1170
|
|
|
1135
|
-
* @see [HPKE Key Derivation Functions](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1171
|
+
* @see [HPKE Key Derivation Functions](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-4.2)
|
|
1136
1172
|
*/
|
|
1137
1173
|
export interface KDF {
|
|
1138
1174
|
/** KDF algorithm identifier */
|
|
@@ -1178,6 +1214,26 @@ export interface KDF {
|
|
|
1178
1214
|
*/
|
|
1179
1215
|
Derive(labeled_ikm: Uint8Array, L: number): Promise<Uint8Array>;
|
|
1180
1216
|
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Performs labeled key derivation for one-stage KDFs.
|
|
1219
|
+
*
|
|
1220
|
+
* This function implements the LabeledDerive operation as specified in the HPKE specification for
|
|
1221
|
+
* use with one-stage KDFs. It constructs a labeled input by concatenating:
|
|
1222
|
+
*
|
|
1223
|
+
* - The input keying material (`ikm`)
|
|
1224
|
+
* - The version string "HPKE-v1"
|
|
1225
|
+
* - The suite identifier (`suite_id`)
|
|
1226
|
+
* - A length-prefixed label
|
|
1227
|
+
* - The desired output length as a 2-byte encoding
|
|
1228
|
+
* - Additional context
|
|
1229
|
+
*
|
|
1230
|
+
* The labeled input is then passed to the KDF's Derive function to produce L bytes of output. This
|
|
1231
|
+
* ensures domain separation between different uses of the KDF in HPKE.
|
|
1232
|
+
*
|
|
1233
|
+
* @group Utilities
|
|
1234
|
+
* @see [LabeledDerive](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-4.4)
|
|
1235
|
+
*/
|
|
1236
|
+
export declare function LabeledDerive(KDF: Pick<KDF, 'Derive'>, suite_id: Uint8Array, ikm: Uint8Array, label: Uint8Array, context: Uint8Array, L: number): Promise<Uint8Array>;
|
|
1181
1237
|
/**
|
|
1182
1238
|
* Performs labeled extraction for two-stage KDFs.
|
|
1183
1239
|
*
|
|
@@ -1193,7 +1249,7 @@ export interface KDF {
|
|
|
1193
1249
|
* pseudorandom key. This ensures domain separation between different uses of the KDF in HPKE.
|
|
1194
1250
|
*
|
|
1195
1251
|
* @group Utilities
|
|
1196
|
-
* @see [LabeledExtract](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1252
|
+
* @see [LabeledExtract](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-4.4)
|
|
1197
1253
|
*/
|
|
1198
1254
|
export declare function LabeledExtract(KDF: Pick<KDF, 'Extract'>, suite_id: Uint8Array, salt: Uint8Array, label: Uint8Array, ikm: Uint8Array): Promise<Uint8Array>;
|
|
1199
1255
|
/**
|
|
@@ -1213,7 +1269,7 @@ export declare function LabeledExtract(KDF: Pick<KDF, 'Extract'>, suite_id: Uint
|
|
|
1213
1269
|
* of the KDF in HPKE.
|
|
1214
1270
|
*
|
|
1215
1271
|
* @group Utilities
|
|
1216
|
-
* @see [LabeledExpand](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1272
|
+
* @see [LabeledExpand](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-4.4)
|
|
1217
1273
|
*/
|
|
1218
1274
|
export declare function LabeledExpand(KDF: Pick<KDF, 'Expand'>, suite_id: Uint8Array, prk: Uint8Array, label: Uint8Array, info: Uint8Array, L: number): Promise<Uint8Array>;
|
|
1219
1275
|
/**
|
|
@@ -1308,7 +1364,7 @@ export declare function LabeledExpand(KDF: Pick<KDF, 'Expand'>, suite_id: Uint8A
|
|
|
1308
1364
|
|
|
1309
1365
|
|
|
1310
1366
|
* @typeParam K - Key representation produced and consumed by the KEM
|
|
1311
|
-
* @see [HPKE Key Encapsulation Mechanisms](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1367
|
+
* @see [HPKE Key Encapsulation Mechanisms](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-4.1)
|
|
1312
1368
|
*/
|
|
1313
1369
|
export interface KEM<K extends Key = Key> {
|
|
1314
1370
|
/** KEM algorithm identifier */
|
|
@@ -1458,7 +1514,7 @@ export interface KEM<K extends Key = Key> {
|
|
|
1458
1514
|
|
|
1459
1515
|
|
|
1460
1516
|
|
|
1461
|
-
* @see [HPKE AEAD Encryption Algorithm](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1517
|
+
* @see [HPKE AEAD Encryption Algorithm](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-4.3)
|
|
1462
1518
|
*/
|
|
1463
1519
|
export interface AEAD {
|
|
1464
1520
|
/** AEAD algorithm identifier */
|
|
@@ -1487,7 +1543,7 @@ export interface AEAD {
|
|
|
1487
1543
|
* @param pt - Plaintext to encrypt
|
|
1488
1544
|
*
|
|
1489
1545
|
* @returns A promise resolving to the ciphertext with authentication tag appended
|
|
1490
|
-
* @see [Context.Seal P_MAX handling](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1546
|
+
* @see [Context.Seal P_MAX handling](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-5.2)
|
|
1491
1547
|
*/
|
|
1492
1548
|
Seal(key: Uint8Array, nonce: Uint8Array, aad: Uint8Array, pt: Uint8Array): Promise<Uint8Array>;
|
|
1493
1549
|
/**
|
|
@@ -1502,19 +1558,6 @@ export interface AEAD {
|
|
|
1502
1558
|
*/
|
|
1503
1559
|
Open(key: Uint8Array, nonce: Uint8Array, aad: Uint8Array, ct: Uint8Array): Promise<Uint8Array>;
|
|
1504
1560
|
}
|
|
1505
|
-
/**
|
|
1506
|
-
* Integer to Octet String Primitive (I2OSP) as defined in RFC 8017. Converts a non-negative integer
|
|
1507
|
-
* into a byte string of specified length. It's exported for use in custom KEM, KDF, or AEAD
|
|
1508
|
-
* implementations.
|
|
1509
|
-
*
|
|
1510
|
-
* @param n - Non-negative safe integer to convert
|
|
1511
|
-
* @param w - Desired length of output in bytes
|
|
1512
|
-
*
|
|
1513
|
-
* @returns A Uint8Array of length w containing the big-endian representation of n
|
|
1514
|
-
* @group Utilities
|
|
1515
|
-
* @see [I2OSP](https://www.rfc-editor.org/rfc/rfc8017#section-4.1)
|
|
1516
|
-
*/
|
|
1517
|
-
export declare function I2OSP(n: number, w: number): Uint8Array;
|
|
1518
1561
|
/**
|
|
1519
1562
|
* Export-only AEAD mode.
|
|
1520
1563
|
*
|
|
@@ -1525,7 +1568,7 @@ export declare function I2OSP(n: number, w: number): Uint8Array;
|
|
|
1525
1568
|
* This is a factory function that must be passed to the {@link CipherSuite} constructor.
|
|
1526
1569
|
*
|
|
1527
1570
|
* @group AEAD Algorithms
|
|
1528
|
-
* @see [HPKE AEAD Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1571
|
+
* @see [HPKE AEAD Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.3)
|
|
1529
1572
|
*/
|
|
1530
1573
|
export declare const AEAD_EXPORT_ONLY: AEADFactory;
|
|
1531
1574
|
/**
|
|
@@ -1545,7 +1588,7 @@ export declare const AEAD_EXPORT_ONLY: AEADFactory;
|
|
|
1545
1588
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1546
1589
|
*
|
|
1547
1590
|
* @group KDF Algorithms
|
|
1548
|
-
* @see [HPKE KDF Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1591
|
+
* @see [HPKE KDF Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.2)
|
|
1549
1592
|
*/
|
|
1550
1593
|
export declare const KDF_HKDF_SHA256: KDFFactory;
|
|
1551
1594
|
/**
|
|
@@ -1565,7 +1608,7 @@ export declare const KDF_HKDF_SHA256: KDFFactory;
|
|
|
1565
1608
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1566
1609
|
*
|
|
1567
1610
|
* @group KDF Algorithms
|
|
1568
|
-
* @see [HPKE KDF Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1611
|
+
* @see [HPKE KDF Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.2)
|
|
1569
1612
|
*/
|
|
1570
1613
|
export declare const KDF_HKDF_SHA384: KDFFactory;
|
|
1571
1614
|
/**
|
|
@@ -1585,7 +1628,7 @@ export declare const KDF_HKDF_SHA384: KDFFactory;
|
|
|
1585
1628
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1586
1629
|
*
|
|
1587
1630
|
* @group KDF Algorithms
|
|
1588
|
-
* @see [HPKE KDF Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1631
|
+
* @see [HPKE KDF Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.2)
|
|
1589
1632
|
*/
|
|
1590
1633
|
export declare const KDF_HKDF_SHA512: KDFFactory;
|
|
1591
1634
|
/**
|
|
@@ -1605,7 +1648,7 @@ export declare const KDF_HKDF_SHA512: KDFFactory;
|
|
|
1605
1648
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1606
1649
|
*
|
|
1607
1650
|
* @group KDF Algorithms
|
|
1608
|
-
* @see [HPKE-PQ One-Stage KDFs](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05
|
|
1651
|
+
* @see [HPKE-PQ One-Stage KDFs](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05#section-5)
|
|
1609
1652
|
*/
|
|
1610
1653
|
export declare const KDF_SHAKE128: KDFFactory;
|
|
1611
1654
|
/**
|
|
@@ -1625,7 +1668,7 @@ export declare const KDF_SHAKE128: KDFFactory;
|
|
|
1625
1668
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1626
1669
|
*
|
|
1627
1670
|
* @group KDF Algorithms
|
|
1628
|
-
* @see [HPKE-PQ One-Stage KDFs](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05
|
|
1671
|
+
* @see [HPKE-PQ One-Stage KDFs](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05#section-5)
|
|
1629
1672
|
*/
|
|
1630
1673
|
export declare const KDF_SHAKE256: KDFFactory;
|
|
1631
1674
|
/**
|
|
@@ -1645,7 +1688,7 @@ export declare const KDF_SHAKE256: KDFFactory;
|
|
|
1645
1688
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1646
1689
|
*
|
|
1647
1690
|
* @group KDF Algorithms
|
|
1648
|
-
* @see [HPKE-PQ One-Stage KDFs](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05
|
|
1691
|
+
* @see [HPKE-PQ One-Stage KDFs](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05#section-5)
|
|
1649
1692
|
*/
|
|
1650
1693
|
export declare const KDF_TurboSHAKE128: KDFFactory;
|
|
1651
1694
|
/**
|
|
@@ -1665,7 +1708,7 @@ export declare const KDF_TurboSHAKE128: KDFFactory;
|
|
|
1665
1708
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1666
1709
|
*
|
|
1667
1710
|
* @group KDF Algorithms
|
|
1668
|
-
* @see [HPKE-PQ One-Stage KDFs](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05
|
|
1711
|
+
* @see [HPKE-PQ One-Stage KDFs](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05#section-5)
|
|
1669
1712
|
*/
|
|
1670
1713
|
export declare const KDF_TurboSHAKE256: KDFFactory;
|
|
1671
1714
|
/**
|
|
@@ -1686,7 +1729,7 @@ export declare const KDF_TurboSHAKE256: KDFFactory;
|
|
|
1686
1729
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1687
1730
|
*
|
|
1688
1731
|
* @group KEM Algorithms
|
|
1689
|
-
* @see [HPKE KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1732
|
+
* @see [HPKE KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.1)
|
|
1690
1733
|
*/
|
|
1691
1734
|
export declare const KEM_DHKEM_P256_HKDF_SHA256: KEMFactory<CryptoKey>;
|
|
1692
1735
|
/**
|
|
@@ -1707,7 +1750,7 @@ export declare const KEM_DHKEM_P256_HKDF_SHA256: KEMFactory<CryptoKey>;
|
|
|
1707
1750
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1708
1751
|
*
|
|
1709
1752
|
* @group KEM Algorithms
|
|
1710
|
-
* @see [HPKE KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1753
|
+
* @see [HPKE KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.1)
|
|
1711
1754
|
*/
|
|
1712
1755
|
export declare const KEM_DHKEM_P384_HKDF_SHA384: KEMFactory<CryptoKey>;
|
|
1713
1756
|
/**
|
|
@@ -1728,7 +1771,7 @@ export declare const KEM_DHKEM_P384_HKDF_SHA384: KEMFactory<CryptoKey>;
|
|
|
1728
1771
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1729
1772
|
*
|
|
1730
1773
|
* @group KEM Algorithms
|
|
1731
|
-
* @see [HPKE KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1774
|
+
* @see [HPKE KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.1)
|
|
1732
1775
|
*/
|
|
1733
1776
|
export declare const KEM_DHKEM_P521_HKDF_SHA512: KEMFactory<CryptoKey>;
|
|
1734
1777
|
/**
|
|
@@ -1749,7 +1792,7 @@ export declare const KEM_DHKEM_P521_HKDF_SHA512: KEMFactory<CryptoKey>;
|
|
|
1749
1792
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1750
1793
|
*
|
|
1751
1794
|
* @group KEM Algorithms
|
|
1752
|
-
* @see [HPKE KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1795
|
+
* @see [HPKE KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.1)
|
|
1753
1796
|
*/
|
|
1754
1797
|
export declare const KEM_DHKEM_X25519_HKDF_SHA256: KEMFactory<CryptoKey>;
|
|
1755
1798
|
/**
|
|
@@ -1770,7 +1813,7 @@ export declare const KEM_DHKEM_X25519_HKDF_SHA256: KEMFactory<CryptoKey>;
|
|
|
1770
1813
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1771
1814
|
*
|
|
1772
1815
|
* @group KEM Algorithms
|
|
1773
|
-
* @see [HPKE KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1816
|
+
* @see [HPKE KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.1)
|
|
1774
1817
|
*/
|
|
1775
1818
|
export declare const KEM_DHKEM_X448_HKDF_SHA512: KEMFactory<CryptoKey>;
|
|
1776
1819
|
/**
|
|
@@ -1794,7 +1837,7 @@ export declare const KEM_DHKEM_X448_HKDF_SHA512: KEMFactory<CryptoKey>;
|
|
|
1794
1837
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1795
1838
|
*
|
|
1796
1839
|
* @group KEM Algorithms
|
|
1797
|
-
* @see [HPKE-PQ KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05
|
|
1840
|
+
* @see [HPKE-PQ KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05#section-3)
|
|
1798
1841
|
*/
|
|
1799
1842
|
export declare const KEM_ML_KEM_512: KEMFactory<CryptoKey>;
|
|
1800
1843
|
/**
|
|
@@ -1814,7 +1857,7 @@ export declare const KEM_ML_KEM_512: KEMFactory<CryptoKey>;
|
|
|
1814
1857
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1815
1858
|
*
|
|
1816
1859
|
* @group KEM Algorithms
|
|
1817
|
-
* @see [HPKE-PQ KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05
|
|
1860
|
+
* @see [HPKE-PQ KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05#section-3)
|
|
1818
1861
|
*/
|
|
1819
1862
|
export declare const KEM_ML_KEM_768: KEMFactory<CryptoKey>;
|
|
1820
1863
|
/**
|
|
@@ -1834,7 +1877,7 @@ export declare const KEM_ML_KEM_768: KEMFactory<CryptoKey>;
|
|
|
1834
1877
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1835
1878
|
*
|
|
1836
1879
|
* @group KEM Algorithms
|
|
1837
|
-
* @see [HPKE-PQ KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05
|
|
1880
|
+
* @see [HPKE-PQ KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05#section-3)
|
|
1838
1881
|
*/
|
|
1839
1882
|
export declare const KEM_ML_KEM_1024: KEMFactory<CryptoKey>;
|
|
1840
1883
|
/**
|
|
@@ -1853,7 +1896,7 @@ export declare const KEM_ML_KEM_1024: KEMFactory<CryptoKey>;
|
|
|
1853
1896
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1854
1897
|
*
|
|
1855
1898
|
* @group AEAD Algorithms
|
|
1856
|
-
* @see [HPKE AEAD Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1899
|
+
* @see [HPKE AEAD Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.3)
|
|
1857
1900
|
*/
|
|
1858
1901
|
export declare const AEAD_AES_128_GCM: AEADFactory;
|
|
1859
1902
|
/**
|
|
@@ -1872,7 +1915,7 @@ export declare const AEAD_AES_128_GCM: AEADFactory;
|
|
|
1872
1915
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1873
1916
|
*
|
|
1874
1917
|
* @group AEAD Algorithms
|
|
1875
|
-
* @see [HPKE AEAD Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1918
|
+
* @see [HPKE AEAD Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.3)
|
|
1876
1919
|
*/
|
|
1877
1920
|
export declare const AEAD_AES_256_GCM: AEADFactory;
|
|
1878
1921
|
/**
|
|
@@ -1891,7 +1934,7 @@ export declare const AEAD_AES_256_GCM: AEADFactory;
|
|
|
1891
1934
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1892
1935
|
*
|
|
1893
1936
|
* @group AEAD Algorithms
|
|
1894
|
-
* @see [HPKE AEAD Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-
|
|
1937
|
+
* @see [HPKE AEAD Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-hpke-06#section-7.3)
|
|
1895
1938
|
*/
|
|
1896
1939
|
export declare const AEAD_ChaCha20Poly1305: AEADFactory;
|
|
1897
1940
|
/**
|
|
@@ -1917,7 +1960,7 @@ export declare const AEAD_ChaCha20Poly1305: AEADFactory;
|
|
|
1917
1960
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1918
1961
|
*
|
|
1919
1962
|
* @group KEM Algorithms
|
|
1920
|
-
* @see [HPKE-PQ Hybrid KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05
|
|
1963
|
+
* @see [HPKE-PQ Hybrid KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05#section-4)
|
|
1921
1964
|
*/
|
|
1922
1965
|
export declare const KEM_MLKEM768_X25519: KEMFactory;
|
|
1923
1966
|
/**
|
|
@@ -1943,7 +1986,7 @@ export declare const KEM_MLKEM768_X25519: KEMFactory;
|
|
|
1943
1986
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1944
1987
|
*
|
|
1945
1988
|
* @group KEM Algorithms
|
|
1946
|
-
* @see [HPKE-PQ Hybrid KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05
|
|
1989
|
+
* @see [HPKE-PQ Hybrid KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05#section-4)
|
|
1947
1990
|
*/
|
|
1948
1991
|
export declare const KEM_MLKEM768_P256: KEMFactory;
|
|
1949
1992
|
/**
|
|
@@ -1969,6 +2012,6 @@ export declare const KEM_MLKEM768_P256: KEMFactory;
|
|
|
1969
2012
|
* > [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble)
|
|
1970
2013
|
*
|
|
1971
2014
|
* @group KEM Algorithms
|
|
1972
|
-
* @see [HPKE-PQ Hybrid KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05
|
|
2015
|
+
* @see [HPKE-PQ Hybrid KEM Identifiers](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-05#section-4)
|
|
1973
2016
|
*/
|
|
1974
2017
|
export declare const KEM_MLKEM1024_P384: KEMFactory;
|