• ISO 7816-4: GET RESPONSE and ENVELOPE command


    http://www.cardwerk.com/smartcards/smartcard_standard_ISO7816-4_7_transmission_interindustry_commands.aspx

    7. Transmission-oriented Interindustry Commands

    7.1 GET RESPONSE command 
    7.2 ENVELOPE command

    It shall not be mandatory for all cards complying to this part of ISO/IEC 7816 to support all the described commands or all the options of a supported command.

    When international interchange is required, a set of card system services and related commands and options shall be used as defined in clause 9.

    Table 11 provides a summary of the commands defined in this part of ISO/IEC 7816.

    The impact of secure messaging (see 5.6) on the message structure is not described in this clause.

    The list of error and warning conditions given in each clause 7.X.5 is not exhaustive (see 5.4.5).

    7.1 GET RESPONSE command

    7.1.1 Definition and scope 
    7.1.2 Conditional usage and security 
    7.1.3 Command message 
    7.1.4 Reponse message (nominal case) 
    7.1.5 Status conditions 

    7.1.1 Definition and scope

    The GET RESPONSE command is used to transmit from the card to the interface device APDU(s) (or part of the APDUs) which otherwise could not be transmitted by the available protocols.

    7.1.2 Conditional usage and security

    No condition.

    7.1.3 Command message

    Table 74 - GET RESPONSE command APDU
    CLA As defined in 5.4.1
    INS 'C0'
    P1-P2 '0000' (other values are RFU)
    Lc field Empty
    Data field Empty
    Le field Maximum length of data expected in response

    7.1.4 Response message (nominal case)

    Table 75 - GET RESPONSE response APDU
    Data field (Part of) APDU according to Le
    SW1-SW2 Status bytes

    7.1.5 Status conditions

    The following specific normal processing may occur : 

    SW1='61' with SW2
    • 'XX': Normal processing: more data bytes are available ('XX' indicates a number of extra data bytes still available by subsequent GET RESPONSE).
    The following specific warning condition may occur :SW1='62' with SW2=
    • '81': Part of returned data may be corrupted
    The following specific error conditions may occur. 
    SW1='67' with SW2=
    • '00': Wrong length (the Lc field is incorrect)
    SW1='6A' with SW2=
    • '86': Incorrect parameters P1-P2
    SW1='6C' with SW2=
    • 'XX': Wrong length (wrong Le field, 'XX' indicates the exact length)

    7.2 ENVELOPE command

    7.2.1 Definition and scope 
    7.2.2 Conditional usage and security 
    7.2.3 Command message 
    7.2.4 Reponse message (nominal case) 
    7.2.5 Status conditions

     

    7.2.1 Definition and scope

    The ENVELOPE command is used to transmit APDU(s) or part of APDUs or any data string which otherwise could not be transmitted by the available protocols.

    NOTE - The usage of ENVELOPE for SM is shown in annex F .

    7.2.2 Conditional usage and security

    No condition.

    7.2.3 Command message

    Table 76 - ENVELOPE command APDU
    CLA As defined in 5.4.1
    INS 'C2'
    P1-P2 '0000' (other values are RFU)
    Lc field Length of the subsequent data field
    Data field (Part of) APDU
    Le field Empty of length of expected data

    When the ENVELOPE command is used under T=0 for transmitting data strings, an empty data field in an ENVELOPE command APDU means end of data string.

    7.1.4 Response message (nominal case)

    Table 77 - ENVELOPE response APDU
    Data field Empty or (part of) APDU according to Le
    SW1-SW2 Status bytes

    NOTE - The status bytes belong to the ENVELOPE command. Status bytes of a command transmitted in the data field of the ENVELOPE command may be found in the data field of the ENVELOPE response.

    7.2.5 Status conditions

    The following specific error conditions may occur. 

    SW1='67' with SW2=
    • '00': Wrong length (the Lc field is incorrect)
  • 相关阅读:
    删除某个目录下面指定名字的文件夹的命令
    ubuntu 12.04 下面安装vmware workstation 8.0.4
    最近一段时间总结
    ejb 学习笔记HelloWorld入门实例
    状态会话bean的session周期与Web上的session周期
    ubuntu做路由器
    Heron and His Triangle 递推 高精度 打表 HDU6222
    洛谷训练赛 A.Misaka Network
    HZNU Training 1 for Zhejiang Provincial Competition 2020 Xeon第三场训练赛
    莫比乌斯反演
  • 原文地址:https://www.cnblogs.com/shangdawei/p/4605479.html
Copyright © 2020-2023  润新知