[clug] People save my bacon again!

Bob Edwards bob at cs.anu.edu.au
Fri Sep 13 01:51:34 CEST 2013

On 13/09/13 08:59, Paul Warren wrote:
> Hash: SHA512
> On 10/09/13 21:40, Paul Wayper wrote:
>> *grumble brumble not enough bacon* oh, sorry, where was I?
>> Ah, yes.  We've got a couple of people who've offered to talk on
>> Thursday night:
>> Andreas Fischer will be giving a high-level overview of the
>> networking code in the game he's working on.  He'll talk about the
>> API, Doxygen, test driven development and amusing anecdotes about
>> Peter Miller :-)
>> Paul Warren will be talking about his rtl-entropy code, available
>> at:
>> https://github.com/pwarren/rtl-entropy
>> He'd also like to ask for a code review and with help on the crypto
>> side of things.
>> Thanks to Andreas and Paul for volunteering at short notice!
>> And I was going to fill in with a bit about some variable length
>> coding schemes, for the maths and number geeks out there :-)  We'll
>> see if that's necessary - I think there'll be plenty of interesting
>> programming stuff to talk about already.
>> Thursday night, 7PM, at room N101 at ANU.  Email the list if you
>> need to know more!
>> Have fun,
>> Paul
> Thanks for listening :)
> There's lots more info on rtl-sdr stuff at
> http://sdr.osmocom.org/trac/wiki/rtl-sdr
> They've a list of known compatible USB sticks. The best place I've found
> to buy them is: http://www.nooelec.com/store/
> I have a few suggestions on what to improve (Move stuff out of
> main(), thanks Bob!)

Thanks for your talk, Paul.

I was particularly intrigued by the possibility that a third party
may be able to _influence_ your RNG, rather than just the traditional
concern about them being able to anticipate the next value.

I wonder how susceptible diode junction noise is to external factors?
(I should know, I did study Electronics I, II and III at Uni. but that
was many years ago...).

Still like to know more about that XOR operation on previous vectors.
Cryptographically, that could be a bad thing, but we aren't doing crypto
here, so I need to alter my mindset about what the purpose of it is.

As for your main(), quality open-source code is always good, regardless
of the coding style - if you prefer all your code in main(), then leave
it there - it's your code, after all.

If you do want to change it, a simple layout might be to put all
command-line and options processing code in one function, all
initialisation code in another and the main loop into a third, then
call each in sequence from main(). (If you were going to take a page
out of Andreas's also excellent talk, then you could do your unit
testing on each function separately to "increase your confidence" that
it does what it is supposed to - harder to do with a monolithic

Another simple guideline is to avoid any function spanning more than
one page/screen (say 50 - 60 lines, including comments), so it can all
be seen (and understood) at once without scrolling/page-flipping.


Bob Edwards.

> any contributions will be helpful, I've not done C coding for many
> years, and have little knowledge of what is cryptographically bad about
> the entropy my code produces!
> In regards to EFI booting that a guy asked about (Sorry, I don't
> remember your name!) on my macbook air. The debian 7 install ISOs come
> with an EFI bootloader, so if you boot the image via EFI, it'll
> automatically install grub2 in EFI mode.
> To change from rEFIt or similar bios emulation, follow something like:
> http://mennucc1.debian.net/macbook_linux_efi.html
> Which amounts to, installing grub-efi-amd64 (or grub-efi on i386), and
> making a vfat partition, mounted at /efi, copying the right stuff in,
> and rebooting :)
> Here's another howto for reference:
> http://tanguy.ortolo.eu/blog/article51/debian-efi
> Cheers
> - --
> Paul
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> iQJ8BAEBCgBmBQJSMkc4XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
> +j/giWzfZDHJnwmbj1LxdfeV+kHYRN2imqvzMrWfZK1eazsf3SKQQBsspIQ0yFYN
> 0GM1hXGwwzu4zUBUBRd9rmuTNLOB6AZIK+/LgUBlq4Q/DNoRNktCd3KYpf6Vlw5m
> Kn/T4QvjsHI9mkrxZVxnjY/VSX8+rmmk+YtlW8GVxjKWoyRmE5v2WwW0mn+ZlCBn
> VogdR+V3eRlimZuOLSzQsNZDT+jWse9apDAeZa+5/LjjyyQDbcKvgEqMPASHuLYg
> 4RAkpcUItYrobhVRWGBS8IkluCquj68txkAhD7jDAb9VISk1//yO7gDbn1dZf100
> iWtInYmggMjcA69HhnjMOw7d5d4PFFig5GjdempknM3iUAdDMcURwRprzEMsuRnd
> uvo8pVM1dqoW8wmSQTQ/Mpfp0UQsxc2AJ9qxIYHI4iMCBXMpuqHS8xsEGh8abelp
> kblc91TXsUQZEyu+vIlG8y+G1NEoskGoAkrWCO1LcSg8ObIvi3HEEVbbbWVPNegU
> xp+0aAnexUyhORLkPevF8BAZcdaBep6x09OxZCaySvARBtmChiQul+l+u7GcKOUn
> ROFcfYxIVunkZYaeG5w8MCjQT32xCLbQc2Q6uuu4iTgAVV6d4ALJWKrxYR/f/kO3
> 8TG4EW2lfWy3AeCqMsEg
> =PCuT

More information about the linux mailing list