Two applications open the same PKCS #12 file. Both report success. One of them actually checked the seal. The other could not read the seal at all, ignored the failed check, and walked straight on to the encrypted private key inside.

Neither application is broken. That is the point. RFC 9879, the September 2025 IETF document that dragged the integrity protection of the world's most-travelled key container into the modern era, made the honest path interoperable. It never promised to close the other one.

What RFC 9879 actually changed

Published as an Informational IETF document in September 2025, RFC 9879 obsoletes RFC 9579 and updates both the PKCS #12 and PKCS #5 specifications. Its headline move is to permit id-PBMAC1 as the integrity algorithm inside the PKCS #12 DigestInfo. When that identifier appears, the PBMAC1 parameters must appear with it and agree with it, and the digest must be computed over authSafe using them.

The change snaps an old coupling. Under the original PKCS #12 password-integrity construction, the container-specific derivation method dictated how the MAC key was produced. PBMAC1 makes the key-derivation function and the underlying message-authentication function explicit. Every conforming implementation must support PBKDF2 with HMAC-SHA-256 for both the integrity calculation and the PBKDF2 pseudorandom function. Other SHA-2 HMACs are recommended; other choices, scrypt included, may be implemented.

The reader that walks straight past the seal

Here is the compatibility clause that should keep a security team awake. The new syntax was deliberately shaped so that legacy software can still decrypt the key material even when it cannot interpret the new integrity protection — provided that software is willing to ignore the MAC verification failure. During a transition that is genuinely useful: a new envelope need not make old encrypted contents unreachable overnight.

It is also a clean, uncomfortable demonstration that “the file opened” is not the same sentence as “the integrity check passed.” RFC 9879 does not name a product that behaves this way, and this report does not invent one. The design alone is proof enough that the gap exists.

Where the authority went: into the parameters

That flexibility quietly relocates authority from the algorithm identifier into the parameters. The derived-key length must now be encoded explicitly. A PBKDF2 parameter set that omits keyLength must be rejected, and a SHA-256 HMAC profile should derive 32 octets. PBKDF2 with SHA-1 HMAC should not be used, and digest functions producing 160 bits or less are prohibited.

Two familiar-looking outer fields stop governing the calculation. When PBMAC1 is selected, the PKCS #12 macSalt and iterations values must be ignored — though RFC 9879 recommends keeping them non-empty and non-zero for backwards compatibility. An audit that pulls those outer values without following the selected algorithm into PBMAC1-params can therefore report a convincing, precise, entirely irrelevant iteration count.

The password that was never the password

Password encoding is where running evidence beats paper intent. RFC 9579 required a terminated BMPString for PBMAC1. Its verified erratum then admitted the awkward truth: the implementation used to generate the test vectors had actually left the password in UTF-8. RFC 9879 resolves the divergence by requiring UTF-8, with no NULL terminator and no byte-order mark.

The episode is not a verdict that implementation always outranks specification. It is evidence that a standards transition has to name the exact bytes produced and consumed, not merely the human-visible password.

What the test vectors prove — and what they don't

The included vectors establish bounded facts. There are valid examples using SHA-256 and SHA-512 combinations, and invalid examples for the wrong iteration count, the wrong salt and a missing key length. Passing them demonstrates that a particular implementation follows those computations.

It does not demonstrate that production passwords are strong, that local parameter floors are enforced, that unknown algorithms fail closed, or that imported keys stay in approved storage. Those are separate claims, and they need separate evidence.

RFC 9879 makes the parameter boundary explicit. KDFs can permit very short outputs — even a single octet — and their parameters are not cryptographically protected. Such values make brute-force attacks against the HMAC easier. The document recommends rejecting derived-key lengths below 20 octets and permits rejection of weak parameters. That recommendation is a floor for a local decision, not proof that every reader enforces it.

The password limit that no MAC can fix

The deeper limit comes from PKCS #5. PBMAC1 verification is a deterministic sequence: fetch the salt, iteration count and key length; derive a key from the password; recompute the MAC; return correct or incorrect. Yet password-based cryptography still permits offline guessing. Salt and work factors raise the cost; they do not manufacture entropy in the password. Scrypt offers a memory-hard alternative meant to blunt the advantage of parallel hardware, but RFC 9879 makes its support optional. A label reading “PBMAC1” therefore identifies a mechanism, not a universal strength level.

The evidence chain

For an import, the chain should read: container received; algorithm and actual parameters parsed; parameter policy accepted; password bytes encoded under the intended rule; MAC verified; decryption separately succeeded; key-use policy accepted; key imported into a named custody boundary; re-export behaviour observed. A gap in that chain should stay a gap — not a footnote smoothed over by a green tick.

Sources