File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
pg/src/main/java/org/bouncycastle/openpgp/operator/jcajce Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -367,22 +367,13 @@ else if (ecdhK.getCurveOID().equals(EdECObjectIdentifiers.id_X448))
367
367
// Modern Ed25519 (1.3.6.1.4.1.11591.15.1 & 1.3.101.112)
368
368
case PublicKeyAlgorithmTags .Ed25519 :
369
369
{
370
- BCPGKey key = publicPk .getKey ();
371
- if (key instanceof Ed25519PublicBCPGKey )
372
- {
373
- return implGetPublicKeyX509 (BigIntegers .asUnsignedByteArray (new BigInteger (1 , publicPk .getKey ().getEncoded ())),
374
- 0 , EdECObjectIdentifiers .id_Ed25519 , "EdDSA" );
375
- }
376
- else
377
- {
378
- return implGetPublicKeyX509 (BigIntegers .asUnsignedByteArray (((EdDSAPublicBCPGKey )publicPk .getKey ()).getEncodedPoint ()),
370
+ return implGetPublicKeyX509 (publicPk .getKey ().getEncoded (),
379
371
0 , EdECObjectIdentifiers .id_Ed25519 , "EdDSA" );
380
- }
381
372
}
382
373
// Modern Ed448 (1.3.101.113)
383
374
case PublicKeyAlgorithmTags .Ed448 :
384
375
{
385
- return implGetPublicKeyX509 (BigIntegers . asUnsignedByteArray ( new BigInteger ( 1 , publicPk .getKey ().getEncoded ()) ),
376
+ return implGetPublicKeyX509 (publicPk .getKey ().getEncoded (),
386
377
0 , EdECObjectIdentifiers .id_Ed448 , "EdDSA" );
387
378
}
388
379
case PublicKeyAlgorithmTags .ELGAMAL_ENCRYPT :
You can’t perform that action at this time.
0 commit comments