- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    21
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8369795 | 21.0.11-oracle | Konanki Sreenath | P3 | Open | Unresolved | 
For example, the "PBEWithHmacSHA1AndAES_256" factory generates different keys from `new PBEKeySpec("12345".toCharArray(), new byte[8], 100)`:
PBEWithHmacSHA1AndAES_256 RAW 31:32:33:34:35
PBEWithHmacSHA1AndAES_256 RAW 75:38:b0:e2:b2:93:0b:36:2a:bf:2a:d8:3a:e0:34:85:c5:9e:41:06:7c:36:d2:b1:ce:e1:8b:9a:c1:3c:62:fa
Note that the generated keys have the same algorithm and format, only the bytes are different.
On the other hand, for "PBKDF2***" factories, both generate derived keys.
- backported by
- 
                    JDK-8369795 SunJCE and SunPKCS11 have different PBE key encodings -           
- Open
 
-         
- caused by
- 
                    JDK-8301553 Support Password-Based Cryptography in SunPKCS11 -           
- Resolved
 
-         
- causes
- 
                    JDK-8356087 Problematic KeyInfo check using key algorithm in P11SecretKeyFactory class -           
- Resolved
 
-         
- csr for
- 
                    JDK-8352294 SunJCE and SunPKCS11 have different PBE key encodings -           
- Closed
 
-         
- duplicates
- 
                    JDK-8236400 java.security.spec.InvalidKeySpecException: Password is not ASCII -           
- Closed
 
-         
- relates to
- 
                    JDK-8348733 Add Hmac and HmacPBE to secret key algorithm names -           
- Open
 
-         
- links to
- 
                     Commit(master)
        openjdk/jdk/6536430a Commit(master)
        openjdk/jdk/6536430a
- 
                     Review(master)
        openjdk/jdk/24068 Review(master)
        openjdk/jdk/24068