ndhu

<?xml version="1.0" ?>
<dsl:security_document xmlns:dsl="http://icalab.csie.ndhu.edu.tw" version="1.0">

<!--Key definition section-->
<key_definition key_link="pub-tkchang">
<key_name>tkchang.pub</key_name>
<key_type>RSA</key_type>
<download_protocol location="file:///h:/keymanager/tkchang.pub"/>
</key_definition>
<key_definition key_link="prv-tkchang">
<key_name>tkchang.prv</key_name>
<key_type>RSA</key_type>
<download_protocol location="file:///h:/keymanager/tkchang.prv"/>
</key_definition>
<key_definition key_link="ser-cywu">
<key_name>cywu.ser</key_name>
<key_type>DES</key_type>
<download_protocol location="file:///E:/DSLT/keymanager/cywu.ser"/>
</key_definition>

<!--End of key definition section-->

<!--Algorithm definition section-->
<algorithm_definition algorithm_link="aglrsa-v15" use="SECURITY">
<algorithm_id>http://www.w3.org/2001/04/xmlenc#rsa-1_5</algorithm_id>
</algorithm_definition>

<algorithm_definition algorithm_link="tripledes" use="SECURITY">
<algorithm_id>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</algorithm_id>
</algorithm_definition>

<algorithm_definition algorithm_link="aglrsamd5" use="SIGNATURE">
<algorithm_name>signaturemd5-rsa.ser</algorithm_name>
<type>RSA</type>
<version>2.0</version>
<property mode="ECB" encode="PKCS#1"/>
<cipher_format XML_text="YES"/>
<download_protocol linking_method="DDL"
jar_file_location="file:///E:/DSLT/algorithmcontainer/signaturemd5-rsa.jar"
serialization_file_location="file:///E:/DSLT/algorithmcontainer/signaturemd5-rsa.ser"/>
</algorithm_definition>
<!--End of algorithm definition section-->

<!--Security pattern section-->
<dsl:security_pattern name="pattern1">
<key_information>
<encryption_key>
<key_definition key_link="pub-tkchang"/>
</encryption_key>
<decryption_key>
<key_definition key_link="prv-tkchang"/>
</decryption_key>
</key_information>

<security_algorithm>
<algorithm_definition algorithm_link="aglrsa-v15"/>
</security_algorithm>
</dsl:security_pattern >

<dsl:security_pattern name="pattern2">
<key_information>
<encryption_key>
<key_definition key_link="ser-cywu"/>
</encryption_key>
<decryption_key>
<key_definition key_link="ser-cywu"/>
</decryption_key>
</key_information>

<security_algorithm>
<algorithm_definition algorithm_link="aglrsa-v15"/>
</security_algorithm>
</dsl:security_pattern >
<!--End of security pattern section-->

<!--Digital signature section-->
<dsl:digital-signature name="chang" time="BEFORE">
<signature_algorithm>
<algorithm_definition algorithm_link="aglrsamd5"/>
</signature_algorithm>
<digest_function>
<digest_definition digest_link="digest-md5"/>
</digest_function>
<key_information>
<sign_key>
<key_definition key_link="prv-ghhwang"/>
</sign_key>
<verify_key>
<key_definition key_link="pub-ghhwang"/>
</verify_key>
</key_information>
<digest-element>
<digest-item select="/transactions/transaction/price" scope="element"/>
</digest-element>
</dsl:digital-signature>

<dsl:digital-signature name="hwang" time="AFTER">
<signature_algorithm>
<algorithm_definition algorithm_link="aglrsamd5"/>
</signature_algorithm>
<digest_function>
<digest_definition digest_link="digest-md5"/>
</digest_function>
<key_information>
<sign_key>
<key_definition key_link="prv-tkchang"/>
</sign_key>
<verify_key>
<key_definition key_link="pub-tkchang"/>
</verify_key>
</key_information>
<digest-element>
<digest-item select="/encrypted/transactions/transaction/encrypted-element[1]" scope="content"/>
</digest-element>
</dsl:digital-signature>

<!--End of digital signature section-->

<!--Transformation description section-->
<dsl:template match="/">
<dsl:copy-tag-apply-templates/>
</dsl:template>

<dsl:template match="/transaction/account">
<dsl:value-of-encrypted-node scope="content"
pattern="pattern1"/>
</dsl:template>

<dsl:template match="/transaction/auth_no">
<dsl:value-of-encrypted-node scope="content"
pattern="pattern2"/>
</dsl:template>

<!--End of transformation description section-->

</dsl:security_document>