Opened 7 months ago

Closed 7 months ago

#2465 closed defect (fixed)

Issue with su3file keygen

Reported by: Meeh Owned by: zzz
Priority: minor Milestone: 0.9.40
Component: api/crypto Version: 0.9.39
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

% java -jar ~/Library/I2P/lib/i2p.jar su3file keygen -t EdDSA_SHA512_Ed25519ph public.meeh.crt meeh.keystore.ks meeh@…
Enter new key password: xxxx
Error creating keys for meeh@…
java.security.GeneralSecurityException?: pubkey mismatch

at net.i2p.crypto.SelfSignedGenerator?.generate(SelfSignedGenerator?.java:249)
at net.i2p.crypto.SelfSignedGenerator?.generate(SelfSignedGenerator?.java:147)
at net.i2p.crypto.KeyStoreUtil?.createKeysAndCRL(KeyStoreUtil?.java:864)
at net.i2p.crypto.KeyStoreUtil?.createKeysAndCRL(KeyStoreUtil?.java:820)
at net.i2p.crypto.SU3File.genKeysCLI(SU3File.java:1012)
at net.i2p.crypto.SU3File.genKeysCLI(SU3File.java:967)
at net.i2p.crypto.SU3File.main(SU3File.java:642)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl?.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl?.invoke(NativeMethodAccessorImpl?.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at net.i2p.util.CommandLine?.exec(CommandLine?.java:72)
at net.i2p.util.CommandLine?.main(CommandLine?.java:55)

Subtickets

Change History (3)

comment:1 Changed 7 months ago by zzz

Component: unspecifiedapi/crypto
Milestone: undecided0.9.40
Owner: set to zzz
Status: newaccepted

Yeah 25519ph is poorly tested, unused. I think we're losing the sigtype in the round-trip from i2p to java to i2p keys. Will look into it.

comment:2 Changed 7 months ago by zzz

enhanced the error message:

java.security.GeneralSecurityException?: pubkey mismatch, in: class net.i2p.crypto.eddsa.EdDSAPublicKey cert: class sun.security.x509.X509Key

will need a fix similar to that in EdDSAEngine… or just skip the check.

comment:3 Changed 7 months ago by zzz

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.