Skip to content

Commit

Permalink
Merge pull request #215 from dajiaji/expose-ciphersuite-native
Browse files Browse the repository at this point in the history
Expose CipherSuiteNative class.
  • Loading branch information
dajiaji authored Jul 30, 2023
2 parents e475a45 + 9bdbf59 commit 8f3fa8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export * from "./src/errors.ts";

export { Aead, AeadId, Kdf, KdfId, Kem, KemId } from "./src/identifiers.ts";
export { CipherSuite } from "./src/cipherSuite.ts";
export { CipherSuiteNative } from "./src/cipherSuiteNative.ts";
export { DhkemP256HkdfSha256 } from "./src/kems/dhkemP256.ts";
export { DhkemP384HkdfSha384 } from "./src/kems/dhkemP384.ts";
export { DhkemP521HkdfSha512 } from "./src/kems/dhkemP521.ts";
Expand Down
16 changes: 15 additions & 1 deletion src/cipherSuiteNative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,24 @@ import * as consts from "./consts.ts";
import * as errors from "./errors.ts";

/**
* The class of Hybrid Public Key Encryption (HPKE) cipher suite.
* The class of Hybrid Public Key Encryption (HPKE) ciphersuite.
* The calling of the constructor of this class is the starting
* point for HPKE operations for both senders and recipients.
*
* This class supports only the ciphersuites which are
* supported by the native Web Cryptography API. Therefore,
* the following cryptographic algorithms are not supported for now:
* - DHKEM(X25519, HKDF-SHA256)
* - DHKEM(X448, HKDF-SHA512)
* - ChaCha20/Poly1305
*
* In addtion, the HKDF functions contained in this `CipherSuiteNative`
* class can only derive keys of the same length as the `hashSize`.
*
* Therefore, if you want to use the unsupported cryptographic algorithms
* above or derive keys longer than the `hashSize`,
* please use {@link CipherSuite}
*
* This class provides following functions:
*
* - Generates a key pair for the cipher suite.
Expand Down

0 comments on commit 8f3fa8e

Please sign in to comment.