Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Padding (cryptography)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=====Zero padding===== All the bytes that are required to be padded are padded with zero. The zero padding scheme has not been standardized for encryption,{{citation needed|date=August 2013}} although it is specified for hashes and MACs as Padding Method 1 in ISO/IEC 10118-1<ref>[https://www.iso.org/standard/64213.html ISO/IEC 10118-1:2016 ''Information technology β Security techniques β Hash-functions β Part 1: General'']</ref> and [[ISO/IEC 9797-1]].<ref>[https://www.iso.org/standard/50375.html ISO/IEC 9797-1:2011 ''Information technology β Security techniques β Message Authentication Codes (MACs) β Part 1: Mechanisms using a block cipher'']</ref> Example: In the following example the block size is 8 bytes and padding is required for 4 bytes ... | DD DD DD DD DD DD DD DD | DD DD DD DD '''00 00 00 00''' | Zero padding may not be reversible if the original file ends with one or more zero bytes, making it impossible to distinguish between plaintext data bytes and padding bytes. It may be used when the length of the message can be derived [[Out-of-band data|out-of-band]]. It is often applied to binary encoded{{clarify |date=March 2020 |reason= What other kind of string is there, other than binary encoded?}} [[String (computer science)|strings]] ([[null-terminated string]]) as the [[null character]] can usually be stripped off as [[Whitespace character|whitespace]]. Zero padding is sometimes also referred to as "null padding" or "zero byte padding". Some implementations may add an additional block of zero bytes if the plaintext is already divisible by the block size.{{citation needed|date=August 2013}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)