Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

WAPI192 AlgorithmID is wrong #2149

Unanswered
daijc8501 asked this question in Q&A
Aug 22, 2025 · 1 comments · 1 reply
Discussion options

I use the following java code to generate WAPI192 keypair,
KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC", providerName);
kpg.initialize(new ECGenParameterSpec("wapi192v1"));
KeyPair kp = kpg.generateKeyPair();

The public key generated like this,
-----BEGIN PUBLIC KEY-----
MEkwEwYHKoZIzj0CAQYIKoEc12MBAQEDMgAELE3dc1Zq6xy4NKn3kP6KufuADCyT
DDrCqTQxonRLtrWuE+nMn09OeyVGyQ6lkzto
-----END PUBLIC KEY-----

In ASN1 view,
SEQUENCE {
SEQUENCE {
OBJECT IDENTIFIER ecPublicKey (1 2 840 10045 2 1)
(ANSI X9.62 public key type)
OBJECT IDENTIFIER '1 2 156 11235 1 1 1'
}
BIT STRING 0 unused bits
04 2C 4D DD 73 56 6A EB 1C B8 34 A9 F7 90 FE 8A
B9 FB 80 0C 2C 93 0C 3A C2 A9 34 31 A2 74 4B B6
B5 AE 13 E9 CC 9F 4F 4E 7B 25 46 C9 0E A5 93 3B
68
}

Should the parameter OID be "1.2.156.11235.1.1.2.1" ?
Then I wonder if the signature OID is wrong also.

Thanks

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

This has come up before, have a look at: #1478

We'd welcome further clarity on this.

You must be logged in to vote
1 reply
Comment options

Thank you for your reply.
I read #1478, and ligefeiBouncyCastle said " Consequently, we will designate 1.2.156.11235.1.1.1 for the ECDSA-192 algorithm with SHA-256, and allocate 1.2.156.11235.1.1.2.1 to the elliptic curve parameter field." in the end.

  1. the author did not answer the question, that the curve OID should be 1.2.156.11235.1.1.2.1, the same question as mine. It seemd he explain the difference between 1.2.156.10197.1.301.101 and 1.2.156.11235.1.1.2.1
  2. In 1.81, the parameter is 1.2.156.11235.1.1.1, not 1.2.156.11235.1.1.2.1. This does not conform to what he said.

Do I make myself clear?

And further more, I am quite confused about the signature methodology. The signature can not be verified by SHA256withECDSA. If anyone knows it, very appreciate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /