From 607806976a3908e471cc4fde34fbd3863878decc 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 6b475316f041..5296b4f7662c 100644 --- a/packages/backend/src/core/CreateSystemUserService.ts +++ b/packages/backend/src/core/CreateSystemUserService.ts @@ -38,7 +38,7 @@ export class CreateSystemUserService { // Generate secret const secret = generateNativeUserToken(); - const keyPair = await genRsaKeyPair(); + const keyPair = await genRsaKeyPair(3072); let account!: MiUser; diff --git a/packages/backend/src/core/SignupService.ts b/packages/backend/src/core/SignupService.ts index b9e3ded46f75..9b2fc03d2154 100644 --- a/packages/backend/src/core/SignupService.ts +++ b/packages/backend/src/core/SignupService.ts @@ -93,7 +93,7 @@ export class SignupService { const keyPair = await new Promise((res, rej) => generateKeyPair('rsa', { - modulusLength: 2048, + modulusLength: 3072, publicKeyEncoding: { type: 'spki', format: 'pem',