Skip to content

Commit

Permalink
Fix addressed pull request review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
forkimenjeckayang committed May 28, 2024
1 parent b287a84 commit 99891c5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static class EncryptingKeyCreationCfg {
private final String sigAlgo = "SHA256withECDSA";

@Builder.Default
private final String curve = "Curve25519";
private final String curve = "secp256r1";
}

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public JceKeyAgreeRecipientInfoGenerator getJceKeyAgreeRecipientInfoGenerator(Ke
CMSAlgorithm.ECDH_SHA256KDF,
senderKeyPair.getPrivate(),
senderKeyPair.getPublic(),
CMSAlgorithm.AES128_WRAP);
CMSAlgorithm.AES256_WRAP);
jceKeyAgreeRecipientInfoGenerator.addRecipient(publicKeyWithId.getKeyID().getValue().getBytes(), publicKeyWithId.getPublicKey());
return jceKeyAgreeRecipientInfoGenerator;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public class KeyAgreeDecryptor extends Decryptor {

@Override
@SneakyThrows
public InputStream decryptionStream(Key key) {
public InputStream decryptionStream(Key privateKey) {
return recipientInfo
.getContentStream(new JceKeyAgreeEnvelopedRecipient((PrivateKey) key))
.getContentStream(new JceKeyAgreeEnvelopedRecipient((PrivateKey) privateKey))
.getContentStream();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ keys:
algo: ECDH
size: 256
sigAlgo: SHA256withECDSA
curve: Curve25519
curve: secp256r1
signing:
algo: ECDH
size: 256
sigAlgo: SHA256withECDSA
curve: Curve25519
curve: secp256r1
cms:
algo: cms-algo1

0 comments on commit 99891c5

Please sign in to comment.