removed manipulation of ef_card_security since this would require the complete public point instead of the compressed public point
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@716 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -201,14 +201,19 @@ class nPA_SE(Security_Environment):
|
||||
pace.EAC_CTX_init_ca(self.eac_ctx, pace.id_CA_ECDH_AES_CBC_CMAC_128, 13, None, None)
|
||||
|
||||
# we don't have a good CA key, so we simply generate an ephemeral one
|
||||
pubkey = pace.buf2string(pace.TA_STEP3_generate_ephemeral_key(self.eac_ctx))
|
||||
if not pubkey:
|
||||
comp_pubkey = pace.buf2string(pace.TA_STEP3_generate_ephemeral_key(self.eac_ctx))
|
||||
if not comp_pubkey:
|
||||
pace.print_ossl_err()
|
||||
raise SwError(SW["WARN_NOINFO63"])
|
||||
ef_card_security = self.mf.select('fid', 0x011d)
|
||||
ef_card_security_data = ef_card_security.getenc('data')
|
||||
ef_card_security_data = ef_card_security_data[:61+4+239+2+2] + pubkey + ef_card_security_data[61+4+239+2+2+len(pubkey):]
|
||||
ef_card_security.setdec('data', ef_card_security_data)
|
||||
#pubkey = pace.some_function_to_get_the_complete_public_point_for_ca_including_prefixed_04(self.eac_ctx)
|
||||
#ef_card_security = self.mf.select('fid', 0x011d)
|
||||
#ef_card_security_data = ef_card_security.getenc('data')
|
||||
#ef_card_security_data = ef_card_security_data[:61+4+239+2+2-1] + pubkey + ef_card_security_data[61+4+239+2+2-1+len(pubkey):]
|
||||
#ef_card_security.setdec('data', ef_card_security_data)
|
||||
|
||||
nonce = pace.PACE_STEP1_enc_nonce(self.eac_ctx, self.sec)
|
||||
print hexdump(nonce)
|
||||
resp = nPA_SE.__pack_general_authenticate([[0x80, len(nonce), nonce]])
|
||||
|
||||
self.eac_step += 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user