Skip to content

Commit

Permalink
Merge pull request #57 from dajiaji/bump-to-2_1_0
Browse files Browse the repository at this point in the history
Bump version to 2.1.0.
  • Loading branch information
dajiaji authored Sep 17, 2024
2 parents eb687e4 + 6f27b2e commit 919b25e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
11 changes: 11 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changes

## Version 2.1.0

Released 2024-09-17

- [(#56) Sync with the latest KAT test vectors.](https://github.com/dajiaji/crystals-kyber-js/pull/56)
- [(#50) Sync with the latest CCTV test vectors.](https://github.com/dajiaji/crystals-kyber-js/pull/50)
- Update devDependencies:
- [(#55) Bump typescript to 5.6.2 in test/runtimes/cloudflare.](https://github.com/dajiaji/crystals-kyber-js/pull/55)
- [(#52) Bump wrangler to 3.78.2 in test/runtimes/cloudflare.](https://github.com/dajiaji/crystals-kyber-js/pull/51)
- [(#51) Bump cloudflare/workers-types to 4.20240909.0 in test/runtimes/cloudflare.](https://github.com/dajiaji/crystals-kyber-js/pull/51)

## Version 2.0.1

Released 2024-09-16
Expand Down
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</div>

<div align="center">
An ML-KEM/CRYSTALS-KYBER implementation written in TypeScript for various JavaScript runtimes.<br>
An ML-KEM (NIST FIPS 203) and CRYSTALS-KYBER implementation written in TypeScript.<br>
</div>
<p></p>

Expand All @@ -28,24 +28,30 @@ This module is based on
[ntontutoveanu/crystals-kyber-javascript](https://github.com/antontutoveanu/crystals-kyber-javascript),
but includes the following improvements:

- ✅ Written in TypeScript.
- ✅ Available on various JavaScript runtimes: Browsers, Node.js, Deno,
Cloudflare Workers, etc.
- ✅ Written in TypeScript.
- ✅ Deterministic key generation support.
- ✅ Constant-time validation for ciphertext.
- ✅ Better performance: 1.4 to 1.8 times faster than the original
implementation.
- ✅ Tree-shaking friendly.
- ✅ Fix [KyberSlash](https://kyberslash.cr.yp.to/index.html) vulnerability.
- ✅ ML-KEM ([FIPS 203](https://csrc.nist.gov/pubs/fips/203/final)) support.
- ✅ ML-KEM ([NIST FIPS 203](https://csrc.nist.gov/pubs/fips/203/final))
support.
- ✅ Passed all the tests published by:
- [post-quantum-cryptography/KAT/MLKEM](https://github.com/post-quantum-cryptography/KAT/tree/main/MLKEM)
- [C2SP/CCTV/ML-KEM](https://github.com/C2SP/CCTV/tree/main/ML-KEM)
- [pq-crystals/kyber](https://github.com/C2SP/CCTV/tree/main/ML-KEM) (10000
consecutive tests)

This repository has the following packages:

| package | registry | description |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| crystals-kyber-js | [![npm](https://img.shields.io/npm/v/crystals-kyber-js?color=%23EE3214)](https://www.npmjs.com/package/crystals-kyber-js) | `v1.x` implements CRYSTALS-KYBER, and `v2.x-` implements ML-KEM (FIPS 203). `crystals-kyber-js` may become deprecated in the near future. Instead, we recommend switching to the following `mlkem` or `@dajiaji/mlkem`. |
| mlkem | [![npm](https://img.shields.io/npm/v/mlkem?color=%23EE3214)](https://www.npmjs.com/package/mlkem) | Implements only ML-KEM (FIPS 203). It is an alias for the above `crystals-kyber-js` starting from `v2` onwards. We recommend using this package going forward. |
| @dajiaji/mlkem | [![JSR](https://jsr.io/badges/@dajiaji/mlkem)](https://jsr.io/@dajiaji/mlkem) | Implements only ML-KEM (FIPS 203). It is an ML-KEM package for [jsr.io](https://jsr.io/). The above `mlkem` is an npm package of `@dajiaji/mlkem`, which has been converted using [@deno/dnt](https://github.com/denoland/dnt). |
| package | registry | description |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| crystals-kyber-js | [![npm](https://img.shields.io/npm/v/crystals-kyber-js?color=%23EE3214)](https://www.npmjs.com/package/crystals-kyber-js) | `v1.x` implements CRYSTALS-KYBER, and `v2.x-` implements ML-KEM (NIST FIPS 203). `crystals-kyber-js` may become deprecated in the near future. Instead, we recommend switching to the following `mlkem` or `@dajiaji/mlkem`. |
| mlkem | [![npm](https://img.shields.io/npm/v/mlkem?color=%23EE3214)](https://www.npmjs.com/package/mlkem) | Implements only ML-KEM (NIST FIPS 203). It is an alias for the above `crystals-kyber-js` starting from `v2` onwards. We recommend using this package going forward. |
| @dajiaji/mlkem | [![JSR](https://jsr.io/badges/@dajiaji/mlkem)](https://jsr.io/@dajiaji/mlkem) | Implements only ML-KEM (NIST FIPS 203). It is an ML-KEM package for [jsr.io](https://jsr.io/). The above `mlkem` is an npm package of `@dajiaji/mlkem`, which has been converted using [@deno/dnt](https://github.com/denoland/dnt). |

For Node.js, you can install `mlkem` or `crystals-kyber-js` via npm, yarn or
pnpm:
Expand Down Expand Up @@ -85,7 +91,7 @@ async function doMlKem() {
try {
doMlKem();
} catch (err: unknown) {
console.log("failed: ", (err as Error).message);
console.log("failed:", (err as Error).message);
}
```

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Version | Supported |
| ------- | ------------------ |
| 2.0.x | :white_check_mark: |
| 2.1.x | :white_check_mark: |
| 1.1.x | :white_check_mark: |
| < 1.1.2 | :x: |

Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dajiaji/mlkem",
"version": "2.0.1",
"version": "2.1.0",
"exports": "./mod.ts",
"imports": {
"@noble/hashes": "npm:@noble/hashes@^1.5.0"
Expand Down

0 comments on commit 919b25e

Please sign in to comment.