Hi everyone,
I would like to know how can I generate a random pre-master key PMK in java? (related in key exchange and authentication) Is it similar with other randam key generating? What particularly is a pre master key?
Thanks, Sebby.
Hi everyone,
I would like to know how can I generate a random pre-master key PMK in java? (related in key exchange and authentication) Is it similar with other randam key generating? What particularly is a pre master key?
Thanks, Sebby.
It looks to me like you are trying to make your own crypto. If that's the case, please don't do it. That's the #1 crypto advice anyone will give you.
If you want to re-implement TLS or something similar, I suggest that you forget your attempt and use a well-tested library. If you MUST implement it, then please take the time to read the specs carefully. They will explain what each step is and how to compute it.
If the only thing you want to a a good bunch of random bytes, SecureRandom
is the API to use.