From f748831d4af8334447164a7adf30423259e9ca21 Mon Sep 17 00:00:00 2001 From: kubodera_yuichi Date: Wed, 6 Jan 2010 06:41:54 +0000 Subject: [PATCH] =?UTF-8?q?AES=E3=82=A4=E3=83=B3=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=81=AE=E4=BF=AE=E6=AD=A3=E3=82=92ECDSA=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=88=E3=81=AB=E9=80=86=E8=BC=B8?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_eFuse@146 ff987cc8-cf2f-4642-8568-d52cce064691 --- hsm_utils/import_ecdsa_keypair.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/hsm_utils/import_ecdsa_keypair.c b/hsm_utils/import_ecdsa_keypair.c index cdde51b..993bb96 100644 --- a/hsm_utils/import_ecdsa_keypair.c +++ b/hsm_utils/import_ecdsa_keypair.c @@ -24,8 +24,8 @@ #include "my_hsm_bignum.h" #include "my_hsm_alloc.h" -#define PRIV_KEY_FILE "/opt/nfast/work/hoge/ctr_eFuse/dummyKey/dev/NintendoCTR2_priv_dummy.der" -#define PUB_KEY_FILE "/opt/nfast/work/hoge/ctr_eFuse/dummyKey/dev/NintendoCTR2_pub_dummy.der" +#define PRIV_KEY_FILE "/opt/nfast/work/ctr_eFuse/hsm_utils/real_key/hoge/NintendoCTR2_privkey_prod.der" +#define PUB_KEY_FILE "/opt/nfast/work/ctr_eFuse/hsm_utils/real_key/hoge/NintendoCTR2_pubkey_prod.der" #define MODULE_ID 1 #define DATA_LEN 256 // bytes @@ -61,8 +61,8 @@ RQCard_FIPS fips; M_KeyID ltid = 0; // the cardset loaded into the module NFKM_CardSet *cardset = NULL; NFKM_ModuleInfo *moduleinfo = NULL; -const NFKM_KeyIdent priv_keyident = { (char*)"simple", (char*)"nintendo-ctr2-priv-dummy-dev" }; -const NFKM_KeyIdent pub_keyident = { (char*)"simple", (char*)"nintendo-ctr2-pub-dummy-dev" }; +const NFKM_KeyIdent priv_keyident = { (char*)"simple", (char*)"nct2-priv-hoge" }; +const NFKM_KeyIdent pub_keyident = { (char*)"simple", (char*)"nct2-pub-hoge" }; unsigned char save_enc[DATA_LEN]; @@ -100,6 +100,7 @@ int importECDSAPrivate( NFKM_KeyIdent keyident ) memset( &privBn, 0, sizeof( privBn ) ); // key data open + printf( "priv key file : %s\n", PRIV_KEY_FILE ); fp = fopen( PRIV_KEY_FILE, "rb" ); if ( !fp ) { @@ -229,6 +230,9 @@ int importECDSAPrivate( NFKM_KeyIdent keyident ) return 1; } + printf( "priv key record success : appname=%s, ident=%s\n", + priv_keyident.appname, priv_keyident.ident ); + return result; } // importECDSAPrivate @@ -258,6 +262,7 @@ int importECDSAPublic( NFKM_KeyIdent keyident ) memset( &pubBn, 0, sizeof( pubBn ) ); // key data open + printf( "pub key file : %s\n", PUB_KEY_FILE ); fp = fopen( PUB_KEY_FILE, "rb" ); if ( !fp ) { @@ -400,6 +405,9 @@ int importECDSAPublic( NFKM_KeyIdent keyident ) return 1; } + printf( "pub key record success : appname=%s, ident=%s\n", + pub_keyident.appname, pub_keyident.ident ); + return result; } // importECDSAPublic