Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
FFDHE: add new class for accessing RFC 7919 Diffie-Hellman parameters. #3183
This PR adds a new generator script that generates a FFDHETable.h. This file contains static string data of the Diffie-Hellman parameters from RFC 7919 in PEM form.
The PR also implements a new class, FFDHE, which exposes a static method PEMForNamedGroup. This static method can be used to look up the PEM data for a specific RFC 7919 group by using the name from RFC 7919. (Such as 'ffdhe2048').
This is the first step in the process of allowing Murmur users to use the RFC 7919 Diffie-Hellman parameters easily in murmur.ini. (For example, via
5 times, most recently
Jul 18, 2017
hacst left a comment
LGTM. Verified data was sourced from RFC and conversion does actually encode to the values in the header the way the standards describe.
To make doubly sure I decoded the base64 asn.1 from the generated header using https://holtstrom.com/michael/tools/asn1decoder.php and checked that g=2 and p has the expected value using
def toint(s): return int( s.replace(' ', '').replace('\n',''), 16) a = toint("""<p-stringfromrfc>""") b = <integervaluefromasn.1decoder> assert(a == b)
on each of the groups.
Here's a signature for the FFDHETable.h I created locally with LF line endings which matches the one currently in this PR (sha256 is 3777965a3d49a1be34b42201ce9a18448de412f8910db19fa6a3ac5eb9944921):