sydapi/DProto/Y0.xml
2021-06-29 11:32:24 +08:00

176 lines
5.5 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" ?>
<packet extend="base">
<req>
<command>
<hex>Y0</hex>
</command>
<data extend = "data">
<srcKeyType len="3" cn="源密钥类型">
查看密钥类型表
</srcKeyType>
<sca len="1" format="X" cn="源算法SCA">
<options>
<option cn="DES">
<hex>1</hex>
</option>
<option cn="3DES">
<hex>2</hex>
</option>
<option cn="IDEA">
<hex>3</hex>
</option>
<option cn="SM1">
<hex>4</hex>
</option>
<option cn="AES">
<hex>5</hex>
</option>
<option cn="SM4">
<hex>6</hex>
</option>
</options>
</sca>
<desKeyType len="3" cn="目的秘钥类型">
查看秘钥类型表
</desKeyType>
<dca len="1" format="X" cn="目的算法SCA">
<options>
<option cn="DES">
<hex>1</hex>
</option>
<option cn="3DES">
<hex>2</hex>
</option>
<option cn="IDEA">
<hex>3</hex>
</option>
<option cn="SM1">
<hex>4</hex>
</option>
<option cn="AES">
<hex>5</hex>
</option>
<option cn="SM4">
<hex>6</hex>
</option>
</options>
</dca>
<roundModel len="1" cn="加密模式">
<options>
<option cn="ECB">
<hex>1</hex>
</option>
<option cn="CBC">
<hex>2</hex>
</option>
<option cn="CFB">
<hex>3</hex>
</option>
<option cn="OFB">
<hex>4</hex>
</option>
</options>
</roundModel>
<sDEK cn="源秘钥DEK">
如果源密钥为外部送入则为LMK加密否则为HSM用户密钥存储区。
27位的索引号16位机构号+3位密钥类型+8位密钥索引号
</sDEK>
<dDEK cn="目的秘钥DEK">
如果源密钥为外部送入则为LMK加密否则为HSM用户密钥存储区。
27位的索引号16位机构号+3位密钥类型+8位密钥索引号
</dDEK>
<dataLength len="4" :value="dataLen()" cn="密文数据长度">
源秘钥加密的密文数据长度
</dataLength>
<infoData cn="密文数据">
源密钥加密的密文数据
</infoData>
<vectorLength len="2" :if="2 == $packet.data.roundModel$option || 3 == $packet.data.roundModel$option || 4 == $packet.data.roundModel$option" :value="vectorLen()" cn="向量长度">
当使用CBCCFB或OFB模式时使用的初始向量长度
可选项当加密模式为CBCCFB或OFB时才显示此项
</vectorLength>
<vector :if="2 == $packet.data.roundModel$option || 3 == $packet.data.roundModel$option || 4 == $packet.data.roundModel$option" cn="向量">
初始向量数据
可选项当加密模式为CBCCFB或OFB时才显示此项
</vector>
<businessKey len="1" cn="业务标识" required="false">
<text>N</text>
取值N可选
当选定此标识时,表示密钥加密方案采用默认方式
</businessKey>
<tailSep len="1" :if=" null != $packet.data.tail " cn="终止信息分隔符">
可选项。如果显示消息尾域则该域必须显示。值为“X19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="消息尾">
可选项。最大长度为 32个字符。
</tail>
</data>
</req>
<res>
<command>
<hex>Y1</hex>
</command>
<data>
<error len="2" cn="错误代码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
<option cn="LMK错误报告给管理员">
<hex>13</hex>
</option>
<option cn="输入数据有误">
<hex>15</hex>
</option>
<option cn="密钥方案错误">
<hex>26</hex>
</option>
<option cn="数据长度错误">
<hex>80</hex>
</option>
</options>
</error>
<cipherData :len="dataLen()" cn="密文数据">
目的密钥加密的密文数据
</cipherData>
<tailSep len="1" required="false" cn="终止信息分隔符">
可选项。如果显示消息尾域,则该域必须显示。值为 “X19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="消息尾">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>function dataLen(){
var data = $packet.data;
return data.infoData.length;
}
function vectorLen(){
var data = $packet.data;
return data.vector.length;
}
</script>
</packet>