简体   繁体   中英

Is it secure to use the same SecureRandom for generation of differen KeyPairs?

I'm using ECIES cryptography to send messages over the internet. For this method, a random key is generated for every message. The encryption key depends on this random key. Is it secure to use the same, not reseeded SecureRandom for the generation of multiple keys?

Yes. A well designed SecureRandom will give random numbers that are completely unpredictable, meaning that if an attacker obtains one key pair, or a thousand key pairs, that will not help him in predicting the next key pair.

Reseeding your secure random will cost quite some time (depending where the actual random bits are coming from), so you do not want to reseed it to often.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM