java - Serial Number of a X.509 Certificate -


i programming certification authority in java uni class, don't know what's best option serial number of certificate.

  • simple static counter 0 verybignumber
  • some huge bigint random number

is there reason choosing 1 on other... or none of them??

thanks,

i recommend use random number, keep list of issued serial numbers in database. allow 2 things.

  1. you never reissue same serial number.
  2. you can tell certificate's serial number if remotely valid.

of course #1 requires check against known list on generation , generate new random number if collision occurs, , #2 isn't of in terms of security or validation interesting prospect never-the-less.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -