Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
shaunb072066
Posts: 14
Registered: ‎04-23-2012
My Carrier: 2063103963

Exception when importing ECDSA X.509 public key

Hi all;

 

Any thoughts on importing the following X.509-formatted public key into my app for ECDSA verification purposes?  I have tried using ECPublicKey pk = PublicKeyDecoder.decode(keyBytes, "X509") (where "keyBytes" is the bits below), but I get a net.rim.device.api.crypto.CryptoUnsupportedOperationException.

 

The ECDSA public key comes from an application written in C++ using Crypto++.

 

I'm stumped.

 

Thanks in advance for any help.

 

 

  0 582: SEQUENCE {
  4 441:   SEQUENCE {
  8   7:     OBJECT IDENTIFIER ecPublicKey (1 2 840 10045 2 1)
 17 428:     SEQUENCE {
 21   1:       INTEGER 1
 24  77:       SEQUENCE {
 26   7:         OBJECT IDENTIFIER prime-field (1 2 840 10045 1 1)
 35  66:         INTEGER 01 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
       :         }
103 136:       SEQUENCE {
106  66:         OCTET STRING 01 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FC
174  66:         OCTET STRING 00 51 95 3E B9 61 8E 1C 9A 1F 92 9A 21 A0 B6 85 40 EE A2 DA 72 5B 99 B3 15 F3 B8 B4 89 91 8E F1 09 E1 56 19 39 51 EC 7E 93 7B 16 52 C0 BD 3B B1 BF 07 35 73 DF 88 3D 2C 34 F1 EF 45 1F D4 6B 50 3F 00
       :         }
242 133:       OCTET STRING
       :         04 00 C6 85 8E 06 B7 04 04 E9 CD 9E 3E CB 66 23
       :         95 B4 42 9C 64 81 39 05 3F B5 21 F8 28 AF 60 6B
       :         4D 3D BA A1 4B 5E 77 EF E7 59 28 FE 1D C1 27 A2
       :         FF A8 DE 33 48 B3 C1 85 6A 42 9B F9 7E 7E 31 C2
       :         E5 BD 66 01 18 39 29 6A 78 9A 3B C0 04 5C 8A 5F
       :         B4 2C 7D 1B D9 98 F5 44 49 57 9B 44 68 17 AF BD
       :         17 27 3E 66 2C 97 EE 72 99 5E F4 26 40 C5 50 B9
       :         01 3F AD 07 61 35 3C 70 86 A2 72 C2 40 88 BE 94
       :         76 9F D1 66 50
378  66:       INTEGER 01 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FA 51 86 87 83 BF 2F 96 6B 7F CC 01 48 F7 09 A5 D0 3B B5 C9 B8 89 9C 47 AE BB 6F B7 1E 91 38 64 09
446   1:       INTEGER 1
       :       }
       :     }
449 134:   BIT STRING
       :     04 01 35 48 15 E0 B3 8A 8D 36 03 29 FE 10 FB FD
       :     4B 6F 5D 34 87 F0 0A 32 30 FB FF 3B 41 8F 94 FA
       :     8A 3D 7C 68 A1 0C F3 13 BE AC 4C AC F7 80 BA 4D
       :     70 8C 13 8E BF 3D D3 70 1F A9 85 C8 E3 B1 86 59
       :     16 25 BD 01 B5 0E 68 E1 B4 13 D5 84 B3 88 79 60
       :     78 BB DF 91 48 19 51 31 A8 27 6D 02 86 D1 62 A9
       :     A9 64 46 3F BF 33 44 F0 70 F0 6A 85 9E D7 66 5F
       :     48 32 C1 F6 28 B1 A1 04 C4 9D B1 93 CE 80 ED 23
       :     33 99 64 1C A7
       :   }

 

Please use plain text.