I would like to implement PGP with PHP. I have seen services like Google reCaptcha or Stripe where they give the user two keys, the public one and secret one. The first one encrypts the comunication between your JS (which is visible to the public) and their API endpoint when you want to get a token based on what the user has written. And later, the second one encrypts the comunication between code and their API endpoint to check that the token is licit.
reCaptcha's key is 40 characters length and Stripe's key is 24 characters length.
How do they do it? Because if I use openssl PHP functions, I get very very long keys, and same expectations with GnuPG.
Thanks a lot, - Albin