diff --git a/README.md b/README.md index f6cca72..c36230f 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,8 @@ Below are the algorithms built in (based on Web Cryptography) and their runtime | HKDF-SHA512 `0x0003` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | SHAKE128 `0x0010` | ✓ | | | | | ✓ | | SHAKE256 `0x0011` | ✓ | | | | | ✓ | -| TurboSHAKE128 `0x0012` | | | | | | ✓ | -| TurboSHAKE256 `0x0013` | | | | | | ✓ | +| TurboSHAKE128 `0x0012` | ✓ | | | | | ✓ | +| TurboSHAKE256 `0x0013` | ✓ | | | | | ✓ | ### Authenticated Encryption (AEAD) diff --git a/docs/README.md b/docs/README.md index c298cc6..db986ab 100644 --- a/docs/README.md +++ b/docs/README.md @@ -64,6 +64,8 @@ console.log(new TextDecoder().decode(decrypted)) // "Hello, World!" - [KDF\_HKDF\_SHA512](variables/KDF_HKDF_SHA512.md) - [KDF\_SHAKE128](variables/KDF_SHAKE128.md) - [KDF\_SHAKE256](variables/KDF_SHAKE256.md) +- [KDF\_TurboSHAKE128](variables/KDF_TurboSHAKE128.md) +- [KDF\_TurboSHAKE256](variables/KDF_TurboSHAKE256.md) ## AEAD Algorithms diff --git a/docs/type-aliases/KDFFactory.md b/docs/type-aliases/KDFFactory.md index a2ebe2d..edde16d 100644 --- a/docs/type-aliases/KDFFactory.md +++ b/docs/type-aliases/KDFFactory.md @@ -12,6 +12,8 @@ exported by this module: - [HKDF-SHA512](../variables/KDF_HKDF_SHA512.md) - [SHAKE128](../variables/KDF_SHAKE128.md) - [SHAKE256](../variables/KDF_SHAKE256.md) +- [TurboSHAKE128](../variables/KDF_TurboSHAKE128.md) +- [TurboSHAKE256](../variables/KDF_TurboSHAKE256.md) > \[!TIP]\ > [CipherSuite](../classes/CipherSuite.md) is not limited to using only these exported KDF implementations. Any function diff --git a/docs/variables/KDF_TurboSHAKE128.md b/docs/variables/KDF_TurboSHAKE128.md new file mode 100644 index 0000000..3626c71 --- /dev/null +++ b/docs/variables/KDF_TurboSHAKE128.md @@ -0,0 +1,22 @@ +# Variable: KDF\_TurboSHAKE128 + +> `const` **KDF\_TurboSHAKE128**: [`KDFFactory`](../type-aliases/KDFFactory.md) + +TurboSHAKE128 key derivation function. + +A one-stage KDF using the TurboSHAKE128 extendable-output function (XOF) with an output length +(Nh) of 32 bytes. + +Depends on the following Web Cryptography algorithms being supported in the runtime: + +- TurboSHAKE128 digest + +This is a factory function that must be passed to the [CipherSuite](../classes/CipherSuite.md) constructor. + +> \[!TIP]\ +> An implementation of this algorithm not reliant on Web Cryptography is also exported by +> [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble) + +## See + +[HPKE-PQ One-Stage KDFs](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-04.html#section-5) diff --git a/docs/variables/KDF_TurboSHAKE256.md b/docs/variables/KDF_TurboSHAKE256.md new file mode 100644 index 0000000..17de45e --- /dev/null +++ b/docs/variables/KDF_TurboSHAKE256.md @@ -0,0 +1,22 @@ +# Variable: KDF\_TurboSHAKE256 + +> `const` **KDF\_TurboSHAKE256**: [`KDFFactory`](../type-aliases/KDFFactory.md) + +TurboSHAKE256 key derivation function. + +A one-stage KDF using the TurboSHAKE256 extendable-output function (XOF) with an output length +(Nh) of 64 bytes. + +Depends on the following Web Cryptography algorithms being supported in the runtime: + +- TurboSHAKE256 digest + +This is a factory function that must be passed to the [CipherSuite](../classes/CipherSuite.md) constructor. + +> \[!TIP]\ +> An implementation of this algorithm not reliant on Web Cryptography is also exported by +> [`@panva/hpke-noble`](https://www.npmjs.com/package/@panva/hpke-noble) + +## See + +[HPKE-PQ One-Stage KDFs](https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-04.html#section-5) diff --git a/index.html b/index.html index 900a621..a7c8718 100644 --- a/index.html +++ b/index.html @@ -2010,7 +2010,12 @@