Use a public key in a symmetric encryption!

Hello,I want to generate a pair of keys (Public/Private) and use the Public Key as a secret key for symmetric encryption.I have 2 questions:1) Is it possible?2) Is there any vulnerability issues following this solution?Thanks
[267 byte] By [Antonioua] at [2007-10-2 19:40:19]
# 1

Why would you want to do this?

Sure you can use the bytes of the Public key as bytes for a symetric key (maybe having hashed them first) but if you publish the public key then anyone can decrypt data encrypted this way!

If you don't publish the Public key then you are in effect using the Publick key as a Secret key so why not just create a Secret key appropriate to the symetric algorithm you are proposing to use.

sabre150a at 2007-7-13 22:18:16 > top of Java-index,Security,Cryptography...
# 2

I'm doing a research and I'm trying, now, to implement my protocol.

I will not publish the Public key.

Why did you say that I have to hash the Public key? Is the key-length as issue?

My aim is to use the value of the Public Key, not its hash value, as a secret key.

Do you think I will face any problem?

Thanks

Antonioua at 2007-7-13 22:18:17 > top of Java-index,Security,Cryptography...
# 3

> I'm doing a research and I'm trying, now, to

> implement my protocol.

>

> I will not publish the Public key.

> Why did you say that I have to hash the Public key?

I did not say you had to hash the public key! I suggested it as a possible approach because your public key will have many more bytes than you need for DES, AES and the like. Hashing will to some extent 'fold' all of your public key entropy into the secret key.

> Is the key-length as issue?

Without knowing your justification for the approach I have no idea.

> My aim is to use the value of the Public Key, not its

> hash value, as a secret key.

> Do you think I will face any problem?

Just in the credibility of the approach. You still have not justified the approach. I don't see how this is better than generating a random key stored in the same place as you would store the public key.

sabre150a at 2007-7-13 22:18:17 > top of Java-index,Security,Cryptography...
# 4
Is there any symmetric algorithm available in java, which allows me to set my own secret key (unspecified key-length) ? In my case, I will use the public key as a secret key.Thanks
Antonioua at 2007-7-13 22:18:17 > top of Java-index,Security,Cryptography...
# 5
You could hash the public key, or treat the bytes of the public key as a "password" and use them in one of the PBE encryption algorithms.
ghstarka at 2007-7-13 22:18:17 > top of Java-index,Security,Cryptography...