Skip to content
  • Adrien Béraud's avatar
    crypto: save dh params · fbdc7b24
    Adrien Béraud authored and Guillaume Roguez's avatar Guillaume Roguez committed
    Diffie-Hellman parameters can take a few seconds to compute,
    during this time a CPU core will be fully used. This leads
    to high power consumption on startup, which can be problematic
    for mobile devices.
    
    This patch introduces saving DH params to the persistent cache
    to avoid regenerating them too often.
    The file modification time is used to know the age of the
    parameters. DH params can be reused for up to 3 days.
    
    * Intoduce writeTime to know a file modification time
    * Introduce to_wstring to convert filenames to the Windows format
    * Introduce a DhParams structure to handle serialization
    
    Tuleap: #452
    Change-Id: Iaea9cf24d922fc6cfc542f8fa7b0c208ebc141d2
    fbdc7b24