I was trying to encode/decode ECC public and private keys into byte arrays. It is straight forward if I have java.security.PublicKey object, which has a getEncoded() method. And I can use org.bouncycastle.jce.provider.asymmetric.ec.KeyFactory.EC.createPublicKeyFromDERStream(byteKey) to recreate a PublicKey object.
However, I don't have java.security and org.bouncycastle.jce in j2me, and I have to stick to org.bouncycastle.crypto. I could only produce AsymmetricCipherKeyPair pbject, which is fine to do encryption/decryption. Anyone knows how to do the encode/decode on this object?