Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-31 Thread Francisco Ferrari Bihurriet
On Tue, 23 May 2023 14:00:30 GMT, Sean Mullan wrote: >> We found several more cases of passwords and encoded keys not cleared that >> were addressed in out Iteration # 2 commit. These cases were both in Java >> and native code. We still have doubts about the effectiveness and need for >> these

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-30 Thread Valerie Peng
On Tue, 23 May 2023 14:00:30 GMT, Sean Mullan wrote: >> We found several more cases of passwords and encoded keys not cleared that >> were addressed in out Iteration # 2 commit. These cases were both in Java >> and native code. We still have doubts about the effectiveness and need for >> these

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-25 Thread Martin Balao
On Tue, 23 May 2023 14:00:30 GMT, Sean Mullan wrote: >> We found several more cases of passwords and encoded keys not cleared that >> were addressed in out Iteration # 2 commit. These cases were both in Java >> and native code. We still have doubts about the effectiveness and need for >> these

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-23 Thread Weijun Wang
On Tue, 23 May 2023 18:55:46 GMT, Martin Balao wrote: >> Hmm, so you are aware of a provider whose Key.getEncoded() impl returns the >> internal key bytes directly? Although the javadoc does NOT state a copy is >> being returned, it's very likely because an "encoding" is returned. If >> intern

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-23 Thread Martin Balao
On Mon, 22 May 2023 22:18:13 GMT, Valerie Peng wrote: >> We discussed this change with @franferrax and have some concerns. The method >> Key::getEncoded does not document that a copy will be returned, and this >> would change the current behavior and affect non-PBE cases. In practical >> terms

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-23 Thread Sean Mullan
On Sat, 20 May 2023 01:20:20 GMT, Martin Balao wrote: >> Martin Balao has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional >> commit

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-22 Thread Valerie Peng
On Sat, 20 May 2023 00:58:05 GMT, Martin Balao wrote: >> Good > > We discussed this change with @franferrax and have some concerns. The method > Key::getEncoded does not document that a copy will be returned, and this > would change the current behavior and affect non-PBE cases. In practical >

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-19 Thread Martin Balao
On Wed, 17 May 2023 03:11:54 GMT, Martin Balao wrote: >> We would like to propose an implementation for the [JDK-8301553: Support >> Password-Based Cryptography in >> SunPKCS11](https://bugs.openjdk.org/browse/JDK-8301553) enhancement >> requirement. >> >> In addition to pursuing the requirem

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-19 Thread Martin Balao
On Wed, 17 May 2023 19:08:26 GMT, Valerie Peng wrote: >> Martin Balao has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains three commits: >> >> - Rebase fix after JDK-8306033. Replace called functions with their new >> names. >> - 8

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-19 Thread Martin Balao
On Fri, 19 May 2023 02:19:00 GMT, Martin Balao wrote: >> Good > > I've just noticed that in this case in particular we can clean it up here but > we need to save a copy in P11PBEKey because if the key has to be transferred > to a different P11 token, we need to re-derive from the password, salt

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-19 Thread Martin Balao
On Thu, 18 May 2023 20:07:37 GMT, Martin Balao wrote: >> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11SecretKeyFactory.java >> line 345: >> >>> 343: throw new InvalidKeyException("Encoded format must be >>> RAW"); >>> 344: } >>> 345: byte

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-18 Thread Martin Balao
On Thu, 18 May 2023 20:10:04 GMT, Martin Balao wrote: >> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11SecretKeyFactory.java >> line 362: >> >>> 360: session = token.getObjSession(); >>> 361: CK_MECHANISM ckMech; >>> 362: char[] password = keyS

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-18 Thread Martin Balao
On Wed, 17 May 2023 19:00:47 GMT, Valerie Peng wrote: >> Martin Balao has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains three commits: >> >> - Rebase fix after JDK-8306033. Replace called functions with their new >> names. >> - 8

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-18 Thread Martin Balao
On Wed, 17 May 2023 18:57:41 GMT, Valerie Peng wrote: >> Martin Balao has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains three commits: >> >> - Rebase fix after JDK-8306033. Replace called functions with their new >> names. >> - 8

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-18 Thread Martin Balao
On Wed, 17 May 2023 18:45:06 GMT, Valerie Peng wrote: >> Martin Balao has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional >> commit

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-18 Thread Martin Balao
On Wed, 17 May 2023 18:44:08 GMT, Valerie Peng wrote: >> Martin Balao has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional >> commit

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-17 Thread Valerie Peng
On Wed, 17 May 2023 03:11:54 GMT, Martin Balao wrote: >> We would like to propose an implementation for the [JDK-8301553: Support >> Password-Based Cryptography in >> SunPKCS11](https://bugs.openjdk.org/browse/JDK-8301553) enhancement >> requirement. >> >> In addition to pursuing the requirem

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11 [v3]

2023-05-16 Thread Martin Balao
> We would like to propose an implementation for the [JDK-8301553: Support > Password-Based Cryptography in > SunPKCS11](https://bugs.openjdk.org/browse/JDK-8301553) enhancement > requirement. > > In addition to pursuing the requirement goals and guidelines of > [JDK-8301553](https://bugs.open