Message padding for bit-oriented and bit-reversed input messages
AssigneeInternational Business Machines Corporation
InventorLouis P. Gomes
Life of this patent
Estimating the term…
Abstract
Systems, methods, and computer-readable media are disclosed for performing message padding of input messages in a manner that preserves the integrity of the input data regardless of whether the input message is in a bit-oriented format or a bit-reversed format. Each byte of a partial input message block of an input message may be converted from a bit-reversed format to a bit-oriented format prior to performing message padding in order to ensure that input data bits are not lost during the message padding. Subsequent to the message padding that generates one or more padded message blocks, the padded message block(s) may be converted from a bit-oriented format to a bit-reversed format to enable further processing of the input message to be performed to obtain a message digest.
Claims14
A computer-implemented method for performing message padding on an electronic input message containing input data, the method comprising:
- identifying, by a computer processor, an electronic partial input message block of the electronic input message, the partial input message block containing at least a portion of the input data;
- converting, by the computer processor, the partial input message block from a bit-reversed format to a bit-oriented format, wherein converting the partial input message block from the bit-reversed format to the bit-oriented format comprises moving an input data bit from a least significant position in a last populated byte of the partial input message block to a most significant position in the last populated byte;
- determining, by the computer processor, a number of one or more extra bits in the last populated byte of the partial input message block, wherein the one or more extra bits do not contain any of the input data;
- storing, by the computer processor, a zero value for each of the one or more extra bits in the last populated byte of the partial input message block;
- performing, by the computer processor, the message padding to generate one or more padded message blocks, wherein performing the message padding to generate the one or more padded message blocks comprises:
- generating a first padded message block at least in part by storing a first portion of a padding signature in the one or more extra bits of the last populated byte of the partial input message block to generate a modified last populated byte and including the modified last populated byte in the first padded message block;
- and
- storing a second portion of the padding signature in a group of one or more available bytes in the first padded message block;
- and
- converting, by the computer processor, the one or more padded message blocks to the bit-reversed format.
A system for performing message padding on an electric input message containing input data, the system comprising:
- at least one memory storing computer-executable instructions;
- and
- at least one processor configured to access the at least one memory and execute the computer-executable instructions to:
- identify an electronic partial input message block of the electronic input message, the partial input message block containing at least a portion of the input data;
- convert the partial input message block from a bit-reversed format to a bit-oriented format, wherein converting the partial input message block from the bit-reversed format to the bit-oriented format comprise moving an input data bit from a least significant position in a last populated byte of the partial input message block to a most significant position in the last populated bye;
- determine a number of one or more extra bits in a last populated byte of the partial input message block, wherein the one or more extra bits do not contain any of the input data;
- store a zero value for each of the one or more extra bits in the last populated byte of the partial input message block;
- perform the message padding to generate one or more padded message blocks;
- and wherein the at least one processor is configured to perform the message padding to generate the one or more padded message blocks by executing the computer—executable instructions to:
- generate a first padded message block at least in part by storing a first portion of a padding signature in the one or more extra bits of the last populated byte of the partial input message block to generate a modified last populated byte and including the modified last populated byte in the first padded message block;
- and
- store a second portion of the padding signature in a group of one or more available bytes in the first padded message block;
- and
- convert the one or more padded message blocks to the bit-reversed format.
A computer program product for preforming message padding on an electronic input message containing input data, the computer program product comprising a non-transitory storage medium readable by a processing circuit, the non-transitory storage medium storing instructions executable by the processing circuit to cause a method to be performed, the method comprising:
- identifying an electronic input message block of the electronic input message, the partial input message block containing at least a portion of the input data;
- converting the partial input message block form a bit-reversed format to a bit-oriented format, wherein converting the partial input message block from the bit-reversed format to the bit-oriented format comprise moving an input data bit from a least significant position in a last populated byte of the partial input message block to a most significant position in the last populated byte;
- determining a number of one or more extra bits in a last populated byte of the partial input message block, wherein the one or more extra bits in the last populated byte of the partial input message block;
- performing the message padding to generate one or more padded message blocks, wherein performing the message padding to generate the one or more padded message blocks comprise:
- generating a first padded message block at least in part by storing a first portion of padding signature in the one or more extra bits of the last populated byte of the partial input message block to generate a modified last populated byte and including the modified last populated byte in the first padded message block;
- and
- storing a second portion of the padding signature in a group of one or more available bytes in the first padded message block;
- and
- converting the one or more padded message blocks to the bit-reversed format.
Dependencies are inferred from the claim text.