From 9e8cbc7081b830a00fdbd49c18929f011a05cfde Mon Sep 17 00:00:00 2001 From: Ajitomi Daisuke Date: Sat, 27 Jan 2024 17:12:24 +0900 Subject: [PATCH 1/2] Bump @noble/hashes to 1.3.3. --- src/kdfs/hkdfSha256.ts | 4 ++-- src/kdfs/hkdfSha384.ts | 4 ++-- src/kdfs/hkdfSha512.ts | 4 ++-- src/kems/primitives/kyber/kyberBase.ts | 2 +- src/kems/primitives/kyber/utils.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/kdfs/hkdfSha256.ts b/src/kdfs/hkdfSha256.ts index 39692f806..ef84e8d7d 100644 --- a/src/kdfs/hkdfSha256.ts +++ b/src/kdfs/hkdfSha256.ts @@ -1,7 +1,7 @@ // @ts-ignore: for "npm:" -import { hmac } from "npm:@noble/hashes@1.3.2/hmac"; +import { hmac } from "npm:@noble/hashes@1.3.3/hmac"; // @ts-ignore: for "npm:" -import { sha256 } from "npm:@noble/hashes@1.3.2/sha256"; +import { sha256 } from "npm:@noble/hashes@1.3.3/sha256"; import { HkdfSha256Native } from "./hkdf.ts"; diff --git a/src/kdfs/hkdfSha384.ts b/src/kdfs/hkdfSha384.ts index 7d4eb35f7..c707346b0 100644 --- a/src/kdfs/hkdfSha384.ts +++ b/src/kdfs/hkdfSha384.ts @@ -1,7 +1,7 @@ // @ts-ignore: for "npm:" -import { hmac } from "npm:@noble/hashes@1.3.2/hmac"; +import { hmac } from "npm:@noble/hashes@1.3.3/hmac"; // @ts-ignore: for "npm:" -import { sha384 } from "npm:@noble/hashes@1.3.2/sha512"; +import { sha384 } from "npm:@noble/hashes@1.3.3/sha512"; import { HkdfSha384Native } from "./hkdf.ts"; diff --git a/src/kdfs/hkdfSha512.ts b/src/kdfs/hkdfSha512.ts index 21113ce8e..2ced515a2 100644 --- a/src/kdfs/hkdfSha512.ts +++ b/src/kdfs/hkdfSha512.ts @@ -1,7 +1,7 @@ // @ts-ignore: for "npm:" -import { hmac } from "npm:@noble/hashes@1.3.2/hmac"; +import { hmac } from "npm:@noble/hashes@1.3.3/hmac"; // @ts-ignore: for "npm:" -import { sha512 } from "npm:@noble/hashes@1.3.2/sha512"; +import { sha512 } from "npm:@noble/hashes@1.3.3/sha512"; import { HkdfSha512Native } from "./hkdf.ts"; diff --git a/src/kems/primitives/kyber/kyberBase.ts b/src/kems/primitives/kyber/kyberBase.ts index d001b2593..013641fd2 100644 --- a/src/kems/primitives/kyber/kyberBase.ts +++ b/src/kems/primitives/kyber/kyberBase.ts @@ -9,7 +9,7 @@ import { shake128, shake256, // @ts-ignore: for "npm:" -} from "npm:@noble/hashes@1.3.2/sha3"; +} from "npm:@noble/hashes@1.3.3/sha3"; import { N, NTT_ZETAS, NTT_ZETAS_INV, Q, Q_INV } from "./consts.ts"; import { KyberError } from "./errors.ts"; diff --git a/src/kems/primitives/kyber/utils.ts b/src/kems/primitives/kyber/utils.ts index d56512213..90f49e040 100644 --- a/src/kems/primitives/kyber/utils.ts +++ b/src/kems/primitives/kyber/utils.ts @@ -1,5 +1,5 @@ // @ts-ignore: for "npm:" -import { shake256 } from "npm:@noble/hashes@1.3.2/sha3"; +import { shake256 } from "npm:@noble/hashes@1.3.3/sha3"; export function byte(n: number): number { return n % 256; From ccc7ed88c90a60bdcee834e9d2fba5816e47524a Mon Sep 17 00:00:00 2001 From: Ajitomi Daisuke Date: Sat, 27 Jan 2024 17:15:14 +0900 Subject: [PATCH 2/2] Bump @noble/ciphers to 0.4.1. --- src/aeads/chacha20Poly1305.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aeads/chacha20Poly1305.ts b/src/aeads/chacha20Poly1305.ts index bf29645e4..16e902eb3 100644 --- a/src/aeads/chacha20Poly1305.ts +++ b/src/aeads/chacha20Poly1305.ts @@ -1,5 +1,5 @@ // @ts-ignore: for "npm:" -import { chacha20poly1305 } from "npm:@noble/ciphers@0.4.0/chacha"; +import { chacha20poly1305 } from "npm:@noble/ciphers@0.4.1/chacha"; import type { AeadEncryptionContext } from "../interfaces/aeadEncryptionContext.ts"; import type { AeadInterface } from "../interfaces/aeadInterface.ts";