Skip to content

Commit a8313b2

Browse files
authored
Merge pull request #20 from jimktrains/newoid
Use current Ed25519 OID
2 parents ab0be28 + c11e9b7 commit a8313b2

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/net/i2p/crypto/eddsa/EdDSAPrivateKey.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,17 @@ public byte[] getEncoded() {
108108
// not in the Josefsson example
109109
rv[idx++] = 0x30;
110110
rv[idx++] = 8;
111-
// OID 1.3.101.100
111+
// OID 1.3.101.112
112112
// https://msdn.microsoft.com/en-us/library/windows/desktop/bb540809%28v=vs.85%29.aspx
113113
// not in the Josefsson example
114+
//
115+
// https://datatracker.ietf.org/doc/draft-ietf-curdle-pkix/?include_text=1
116+
// id-Ed25519 OBJECT IDENTIFIER ::= { 1 3 101 112 }
114117
rv[idx++] = 0x06;
115118
rv[idx++] = 3;
116119
rv[idx++] = (1 * 40) + 3;
117120
rv[idx++] = 101;
118-
rv[idx++] = 100;
121+
rv[idx++] = 112;
119122
// params
120123
rv[idx++] = 0x0a;
121124
rv[idx++] = 1;

src/net/i2p/crypto/eddsa/EdDSAPublicKey.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,17 @@ public byte[] getEncoded() {
8484
// sequence
8585
rv[idx++] = 0x30;
8686
rv[idx++] = 8;
87-
// OID 1.3.101.100
87+
// OID 1.3.101.112
8888
// https://msdn.microsoft.com/en-us/library/windows/desktop/bb540809%28v=vs.85%29.aspx
89+
// not in the Josefsson example
90+
//
91+
// https://datatracker.ietf.org/doc/draft-ietf-curdle-pkix/?include_text=1
92+
// id-Ed25519 OBJECT IDENTIFIER ::= { 1 3 101 112 }
8993
rv[idx++] = 0x06;
9094
rv[idx++] = 3;
9195
rv[idx++] = (1 * 40) + 3;
9296
rv[idx++] = 101;
93-
rv[idx++] = 100;
97+
rv[idx++] = 112;
9498
// params
9599
rv[idx++] = 0x0a;
96100
rv[idx++] = 1;

0 commit comments

Comments
 (0)