Many people are asking how to encrypt using private key and decrypt by public key, whether using RSA or ECC.
The main concern is, we do not want to distribute private key in the software from which hackers can derive a public key. (Public key encryption generate a serial number)
I have also asked if there is anyway to remove some components from RSA private key to prevent public key generation from it. I personally think this is possible and could make private key and public key equivalent, you can not generate one from the other.
Here I have an idea by using Elliptic curve.
Using an ECP field for illustration,
Shared:
ECP contains parameters P,A,B. In the Prime field, y^2=x^3+ax+b (from Wikipedia).
A base point G(x,y) that satisfied above equation.
Private:
A number pv, such that 1<pv<P.
Public:
A point pb=pv*G.
Encryption needs:
ECP(P,A,B), point pb.
Decryption needs:
ECP(P,A,B), number pv.
If we hide G in private key, we can prevent public key generation.
I have a demonstration program using the algorithm from Wikipedia.
http://en.wikipedia.org/wiki/Integrated_Encryption_SchemeFor those who want to implement ECIES themselves, hope this could help.
Please correct me if I am wrong.
--
Gung Shi Jie
Department of Computer Science and Information Engineering,
National Chung Cheng University
Republic of Taiwan