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?

Thanks
MehtaJasminAsked:
Who is Participating?
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:
Hi


Please check this link it has a way to encrypt and decrypt

http://www.informit.com/articles/article.aspx?p=170967&seqNum=4
0
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?
0
Kanti PrasadCommented:
Hi

the below link is using a public key ...

https://javadigest.wordpress.com/2012/08/26/rsa-encryption-example/
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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

Please read my question.
0
Kanti PrasadCommented:
Hi

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.

http://www.javamex.com/tutorials/cryptography/rsa_encryption_2.shtml
0
gurpsbassiCommented:
I've used bouncy castle in the past for stuff like this:
bouncy castle
1

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.
0
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
Encryption

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.