Merge "keystore: compute the padding in an intuitive way."