Formalisms
There are two publicly known operations:A and B
There is a publicly known key of type integer: Public
There is a private key of type integer: Private
B(A(plain_text, Public), Private) = plain_text
A(B(plain_text, Private), Public) = plain_text
It is *difficult* to derive Private from Public, even
with examples of plain_text and it's encryption
It is *difficult* to derive the plain text from the cypher
text even with Public.
Note that generally it's easy to derive Public from Private,
but that's OK.
Choices
There are several public key algorithms, using similar
maths. The most famous is RSA. It's patented.
Speed
Public key cryptography is generally MUCH slower than
private key cryptography.