I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit a1a895e4 authored by zzz's avatar zzz
Browse files

Add EdDSA_SHA512_Ed25519ph

Fix EdDSA OID
parent 9ed185f3
No related branches found
No related tags found
No related merge requests found
...@@ -55,9 +55,17 @@ public enum SigType { ...@@ -55,9 +55,17 @@ public enum SigType {
* @since 0.9.15 * @since 0.9.15
*/ */
EdDSA_SHA512_Ed25519(7, 32, 32, 64, 64, SigAlgo.EdDSA, "SHA-512", "SHA512withEdDSA", EdDSA_SHA512_Ed25519(7, 32, 32, 64, 64, SigAlgo.EdDSA, "SHA-512", "SHA512withEdDSA",
// this is the OID of the key, not the sig, probably wrong EdDSANamedCurveTable.getByName("ed25519-sha-512"), "1.3.101.101", "0.9.17"),
EdDSANamedCurveTable.getByName("ed25519-sha-512"), "1.3.101.100", "0.9.17");
/**
* Prehash version (double hashing, for offline use such as su3, not for use on the network)
* Pubkey 32 bytes; privkey 32 bytes; hash 64 bytes; sig 64 bytes
* @since 0.9.25
*/
EdDSA_SHA512_Ed25519ph(8, 32, 32, 64, 64, SigAlgo.EdDSA, "SHA-512", "NonewithEdDSA",
EdDSANamedCurveTable.getByName("ed25519-sha-512"), "1.3.101.101", "0.9.25"),
;
// TESTING.................... // TESTING....................
...@@ -285,6 +293,8 @@ public enum SigType { ...@@ -285,6 +293,8 @@ public enum SigType {
// handle mixed-case enum // handle mixed-case enum
if (uc.equals("EDDSA_SHA512_ED25519")) if (uc.equals("EDDSA_SHA512_ED25519"))
return EdDSA_SHA512_Ed25519; return EdDSA_SHA512_Ed25519;
if (uc.equals("EDDSA_SHA512_ED25519PH"))
return EdDSA_SHA512_Ed25519ph;
return valueOf(uc); return valueOf(uc);
} catch (IllegalArgumentException iae) { } catch (IllegalArgumentException iae) {
try { try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment