I was looking through block cipher padding methods, and found two good candidates:
- ANSI X.923 - pad with zeros, then a final byte for the padding length, e.g.
00 00 00 04. - PKCS7 - pad with bytes that each show the number of padding bytes, e.g.
04 04 04 04.
Is there any benefit to using PKCS7 over ANSI X.923 padding, or vice versa?