Commit 0d21da4f authored by berge's avatar berge
Browse files

Fixed template issue in ChipAuthentication

parent 7ba63cf8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -124,10 +124,10 @@
    		var CommandManageSecurityEnvironment v_command;
    		var octetstring v_publicKeyPcd;

			[] mrtdport.receive(mw_mseSetKAT) -> value v_command {
			[] mrtdport.receive(mw_mseSetKAT_chipAuthentication) -> value v_command {
				v_publicKeyPcd := v_command.payload
    						.manageSecurityEnvironmentData.crtKAT
    						.crtReferenceOfSecretOrPublicKey.tlvValue;
    						.crtAuxRandomNumber.tlvValue;
				f_chipAuthentication(v_publicKeyPcd);
				mrtdport.send(m_responseOK);
				vc_simu.securityStatus := e_chipAuthenticated;
+2 −1
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@
				in integer p_offset, 
				in integer p_dataLength, 
				out octetstring p_data);
				
		} // end fileExternalFunctions

	} // end externalFunctions
@@ -358,7 +359,7 @@
    		
    		// TODO: determine algorithm used by DG15
    		// if RSA get modulus.length
    		// if (EC)DSA ???
    		// if (EC)DSA => fx_computeSignature
    		
	    	// create trailer (SHA1)
			v_trailer := 'BC'O; 
+36 −0
Original line number Diff line number Diff line
@@ -341,6 +341,42 @@ module ePassport_Templates {
			lengthE := *		
		}
		
		template CommandManageSecurityEnvironment mw_mseSetKAT_chipAuthentication := {
	      	class := mw_class_00,
		  	ins := e_manageSecurityEnvironment, 
  			params := {
  				 mseSecureMessagingInCommandDataField := ?,
				 mseSecureMessagingInResponseDataField := ?,
				 mseComputationDeciphermentIntAuthKeyAgreement := ?,
				 mseVerificationEnciphermentExtAuthKeyAgreement := ?,
				 mseFunction := e_mseFunctionSet,
				 crtTag := e_crtKAT
  			},	
  			lengthC := ?,	  			
  			payload := {
  				manageSecurityEnvironmentData := {
  					crtKAT := {
    					crtCryptographicMechanismReference := omit,
    					crtFileReference := omit,
    					crtDfName := omit,
    					crtReferenceOfSecretOrPublicKey := omit,
    					crtReferenceOfSessionOrPrivateKey := *,
    					crtKeyUsageTemplate	:= omit,
    					crtAuxPreviousExchangedChallengePlusOne	:= omit,
    					crtAuxHashCodeProvidedByCard := omit,
    					crtAuxRandomNumberProvidedByCard := omit,
    					crtAuxRandomNumber := ?,
    					crtAuxTimestampProvidedByCard := omit,
    					crtAuxTimestamp := omit,
    					crtAuxPreviousDigitalSignatureCounterPlusOne := omit,
    					crtAuxDigitalSignatureCounter := omit,
    					crtUsageQualifierByte := omit
  					}
  				}
  			},
			lengthE := *		
		}
		
		template CommandManageSecurityEnvironment mw_mseSetAT := {
	      	class := mw_class_00,
		  	ins := e_manageSecurityEnvironment,