From 2445f6635cf006ec8e258e36d345a1e10676ef38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Mon, 7 Aug 2023 04:32:17 +0900 Subject: [PATCH] enhance(backend): use RSA 3072bit (#137) --- packages/backend/src/core/CreateSystemUserService.ts | 2 +- packages/backend/src/core/SignupService.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/CreateSystemUserService.ts b/packages/backend/src/core/CreateSystemUserService.ts index cef664bf0b..bb7d24cdb2 100644 --- a/packages/backend/src/core/CreateSystemUserService.ts +++ b/packages/backend/src/core/CreateSystemUserService.ts @@ -33,7 +33,7 @@ export class CreateSystemUserService { // Generate secret const secret = generateNativeUserToken(); - const keyPair = await genRsaKeyPair(); + const keyPair = await genRsaKeyPair(3072); let account!: User; diff --git a/packages/backend/src/core/SignupService.ts b/packages/backend/src/core/SignupService.ts index 070a9a9e3e..cfc0a6d9bc 100644 --- a/packages/backend/src/core/SignupService.ts +++ b/packages/backend/src/core/SignupService.ts @@ -92,7 +92,7 @@ export class SignupService { const keyPair = await new Promise((res, rej) => generateKeyPair('rsa', { - modulusLength: 2048, + modulusLength: 3072, publicKeyEncoding: { type: 'spki', format: 'pem',