@sebastienrousseau/crypto-benchmarks 0.0.35 → 0.0.37

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.
@@ -14,7 +14,7 @@ function createPqcOperations() {
14
14
  const message = node_crypto_1.default.randomBytes(32);
15
15
  const { signature } = (0, crypto_lib_1.mlDsaSign)(65, dsa.secretKey, message);
16
16
  return {
17
- mlKem768Encapsulate: () => (0, crypto_lib_1.mlKemEncap)(768, kem.publicKey),
17
+ mlKem768Encapsulate: () => (0, crypto_lib_1.mlKemEncapsulate)(768, kem.publicKey),
18
18
  mlKem768SecretKey: kem.secretKey,
19
19
  mlDsa65Verify: () => (0, crypto_lib_1.mlDsaVerify)(65, dsa.publicKey, message, signature),
20
20
  };
@@ -9,11 +9,11 @@ const node_crypto_1 = __importDefault(require("node:crypto"));
9
9
  const crypto_lib_1 = require("@sebastienrousseau/crypto-lib");
10
10
  const timer_1 = require("../timer");
11
11
  function createMultiRecipients() {
12
- const aliceX = (0, crypto_lib_1.generateX25519KeyPair)();
12
+ const aliceX = (0, crypto_lib_1.x25519Keygen)();
13
13
  const aliceMl = (0, crypto_lib_1.mlKemKeygen)(768);
14
- const bobX = (0, crypto_lib_1.generateX25519KeyPair)();
14
+ const bobX = (0, crypto_lib_1.x25519Keygen)();
15
15
  const bobMl = (0, crypto_lib_1.mlKemKeygen)(768);
16
- const charlieX = (0, crypto_lib_1.generateX25519KeyPair)();
16
+ const charlieX = (0, crypto_lib_1.x25519Keygen)();
17
17
  const charlieMl = (0, crypto_lib_1.mlKemKeygen)(768);
18
18
  const recipients = [
19
19
  {
@@ -45,7 +45,7 @@ function createStreamingOperations() {
45
45
  const payload64k = node_crypto_1.default.randomBytes(64 * 1024);
46
46
  const symmetricKey = node_crypto_1.default.randomBytes(32);
47
47
  const symEnc = (0, crypto_lib_1.streamEncrypt)({ key: symmetricKey, plaintext: payload64k });
48
- const x25519 = (0, crypto_lib_1.generateX25519KeyPair)();
48
+ const x25519 = (0, crypto_lib_1.x25519Keygen)();
49
49
  const mlkem = (0, crypto_lib_1.mlKemKeygen)(768);
50
50
  const pqEnc = (0, crypto_lib_1.streamPqEncrypt)({
51
51
  recipientX25519Public: x25519.publicKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebastienrousseau/crypto-benchmarks",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "description": "Benchmarks comparing classical and post-quantum cryptography in JavaScript: ops/sec, latency and throughput for RSA, ECDSA, AES, SHA-2, ML-KEM and ML-DSA.",
5
5
  "author": "Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>",
6
6
  "license": "MIT OR Apache-2.0",
@@ -37,7 +37,7 @@
37
37
  "dist/**/*.d.ts.map"
38
38
  ],
39
39
  "dependencies": {
40
- "@sebastienrousseau/crypto-lib": "0.0.35"
40
+ "@sebastienrousseau/crypto-lib": "0.0.37"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/chai": "^5.2.3",
@@ -75,6 +75,7 @@
75
75
  "format": "prettier --write src/**/*.ts",
76
76
  "format:check": "prettier --check \"src/**/*.ts\"",
77
77
  "test": "c8 --check-coverage --lines 100 --branches 100 --functions 100 --reporter=lcov --reporter=text mocha --config=.mocharc.cjs",
78
+ "test:run": "mocha --config=.mocharc.cjs",
78
79
  "docs": "typedoc"
79
80
  }
80
81
  }