Apparatus and method for enciphering a data packet of variable width

The present invention relates to an apparatus and method for encryption / decryption according to the IPSEC, the variable width data packet encryption device according to the invention the width fixed in the data packet to be processed in the encryption process, the width, and any input from any of the interface module If the width multiple of the variable width of the data packet, receiving a fixed width in turn a data packet of variable width of the number of the combined value is calculated by dividing a variable-length, a combination of a data packet of variable width of the number of combined values ​​input in order , the variable for generating the data packets with a fixed width and outputs the width-fixed-width data packet converter; And a proportional-encrypted data packets of a fixed width output from the fixed-width data packet conversion section, it is composed of an encryption generating and outputting the encrypted data packets of a fixed width. According to the invention, when the external interface module coupled to the IPSEC chip is changed, there is an effect that the encrypted data packets of variable width output from any of the external interface module, and can decrypt the encrypted data packets of variable width.