News for hackers. Stuff that matters.
Re:Socat: “the hard coded 1024 bit DH p parameter was not pr... by CamperBob2 on Monday February 01, 2016 @04:17PM (#11015531)
Kind of interesting that the first nonprime version ended in a comma, as if it originated as a fragment of a longer array of bytes. That's nonstandard C, and I'd expect that whatever tool(s) generate those arrays would know not to add a comma after the final entry.
Re:Socat: “the hard coded 1024 bit DH p parameter was not pr... by bigiain on Monday February 01, 2016 @05:27PM (#11016093)
<cynical thought>That's a nice piece of plausible deniability, huh? I wonder if the committer has a few extra bytes that he can claim were supposed to be there which make a number that passes all the primality tests? That'd be a nice excuse for the NSA/3PLA overlords to have given him...
Re:Socat: “the hard coded 1024 bit DH p parameter was not pr... by cperciva on Monday February 01, 2016 @06:38PM (#11016577)
Extra bytes would have made it not a 1024-bit integer.
Re:Socat: “the hard coded 1024 bit DH p parameter was not pr... by gertef on Monday February 01, 2016 @09:10PM (#11017259)
Whicgh provides an excuse for why the prime was truncated, and OOPS made it into a not-prime.
Re:Socat: “the hard coded 1024 bit DH p parameter was not pr... by cperciva on Monday February 01, 2016 @05:27PM (#11016096)
The optional comma at the end of the list of entries in an array is explicitly allowed by the C standard.
Re:Socat: “the hard coded 1024 bit DH p parameter was not pr... by CamperBob2 on Monday February 01, 2016 @06:05PM (#11016369)
(Actually I may be confusing the extra comma here with an extra comma at the end of an enum list. Some compilers are OK with that, while others aren't.)
Re:Socat: “the hard coded 1024 bit DH p parameter was not pr... by 1amzave on Tuesday February 02, 2016 @02:41AM (#11018096)
If I'm reading N1256 right (not sure how far back it actually dates, but that's a C standard draft dated 2007), section 6.7.2.3 also explicitly allows a trailing comma in that context as well, so if such a compiler exists its makers should get with the program, so to speak.
Re:Socat: “the hard coded 1024 bit DH p parameter was not pr... by xnyhps on Tuesday February 02, 2016 @04:00AM (#11018355)
It's also there for the previous 512 bit prime. Probably just the style preference of the project.

Edit: Actually, it looks a lot like the code was originally generated using openssl dhparam -2 -C: https://gist.github.com/xnyhps/df16e7d43e32b7dbe3fb