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

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

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -