Public Key encryption using Java 7

If I have a public key from a vendor, most likely from Verisign or so then is there any Java 7 API that I can use for encrypting a file with it?

I don't have to worry about decryption part as they will not share private key and they just need that encrypted file.

What are my options?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kanti PrasadCommented:

Please check this link it has a way to encrypt and decrypt
MehtaJasminAuthor Commented:
Link is showing same way as so many other links out there. It has key generation and decryption part as well.

My requirement is, key generation is not needed. We have public key from vendor. Just need to use it to encrypt.

Is it possible?
Kanti PrasadCommented:

the below link is using a public key ...
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

MehtaJasminAuthor Commented:
No this won't help either. It has both keys and RSA is not the choice for me.

Please read my question.
Kanti PrasadCommented:

If the below link is not what you are looking for then wait for someone else to respond.  It might be a good idea also to look for documentation which Verizon supplies.

As I am thinking that as you have the public key the RSA encryption can be done as below and then you send the message to Verizon Server and they can decrypt as they have the private key.
I've used bouncy castle in the past for stuff like this:
bouncy castle

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MehtaJasminAuthor Commented:
Write now my task is on hold for this problem. But if I need to work on it, then I am planning to use BouncyCastle solution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.