Subject: [jose] PBE salt should include alg id

From: "Manger, James H" <[email-masked]>
Date: Fri, 8 Nov 2013 11:51:45 +1100

JWA section 4.9 “Key Encryption with PBES2” should follow the recommendation of the PBES2 spec [RFC 2898 section 4.1 “Salt”] by including in the salt “data that explicitly distinguishes between different operations and different key lengths”.

We can do this quite easily in JWA by including the alg value (eg “PBES2-HS384+A192KW”) in the salt. I suggest:

  salt = UTF8(alg) || 0x00 || BASE64URL_DECODE(p2s)

--
James Manger