The Reply Encryption Section
Need for Reply Encryption
The reasons for encrypting messages have already been discussed.
The reply encryption section provides the ability for management agents to request that responses be encrypted even though the requests are not encrypted, or that responses be encrypted using a different key or even a different scheme from that used to encrypt the request. A good example is a public key encryption system, where the requesting application needs to pass its public key to the processing agent.
Format of the Reply Encryption Section
The reply encryption section contains any data required to encrypt the reply message. The ASN.1 format of this section is shown in Figure 4.
ReplyEncryptSection :: = IMPLICIT SEQUENCE {
replyEncryptType INTEGER,
replyEncryptData ANY
}
Figure 4: ASN.1 Format of Reply Encryption Section
If the section is omitted, then the reply should be encrypted in the manner specified by the encryption section. If the section is present, then the replyEncryptType field contains a number defining the encryption method to use and replyEncryptData contains whatever data, for example a key, which the receiver must have to encrypt the reply message.
If the reply encryption section is present, then the reply message must contain an appropriate encryption section, which indicates the encryption method requested in the reply encryption section is in use. The reply message should be encrypted starting with the first octet after the encryption section.
If the reply encryption method requested is not supported by the entity, the entity may not send a reply. It may, at the discretion of the implementor, send a protocol error message. (See below for descriptions of protocol error messages.)
Currently no encryption types are assigned.