A bug in the PBKDF implementation in the pkcs12 package caused certain inputs to produce the wrong output. In step 6C, we treat Ij as a big.Int of v bytes and compute Ij + B + 1. The resulting big.Int can have leading zero bytes, such that Ij.Bytes() produces a byte array that is smaller than v bytes. In this case we must zero-pad the output to make Ijb properly sized. Change-Id: I6e672e6f6bbbd5bea419355d318db289731bb174 Reviewed-on: https://go-review.googlesource.com/16520 Reviewed-by: Adam Langley <agl@golang.org>