[onerng talk] The world's (other) most secure TRNG

Bill Cox waywardgeek at gmail.com
Tue Sep 30 03:15:06 BST 2014


On Mon, Sep 29, 2014 at 7:56 PM, Paul Campbell <paul at taniwha.com> wrote:

> On Mon, 29 Sep 2014 19:25:31 Bill Cox wrote:
> > I've been trying to bread-board it.  The freaking surface mount parts are
> > holding me back at the moment.  I've got a $100 purchase of Digikey parts
> > mounted on Proto Advantage adapters, but it's expensive and slow!
>
> actually I've gone completely surface mount - startup is expensive (tool
> wise)
> but all the cheap stuff from China has made that completely doable
>
> I buy by the reel these days - I use Dirty PCBs for proto boards at the
> moment: http://dirtypcbs.com/  - they're good people
>

Thanks for the tip.  I'll check them out.  I have to say, "Dirty PCB"?!?
Geeks suck at names!


> > > if you need help finding cheap and easy ways to build prototype
> > > boards I can help point you at cheap stuff in China - or we could spin
> a
> > > version of my board with your RNG on it as a proof-of-concept.
> >
> > I would love to know how to get stuff built cheaply!  Please let me know.
> > I was about to start Googling Arduino projects to see if I could find out
> > what's the best way now days.
>
> well I bought a cheap pick-and-place, I do my own prototypes (I was
> thinking
> of PCB boards), I wouldn't manufacture in volume though - but you don't
> really
> need it, you can too with just a cheap chinese reflow oven, either get
> solder
> stencils made or just drop solder from a syringe on to pads - then place
> parts
> by hand - then run it thru the oven the results look as good as
> commercially
> made stuff
>

Proto Advantage sells stencils and solder past syringes.  Frankly, I'm too
old for this!


> Actual production in the 1000s means going to China .... that's a whole
> other
> story
>

I'll take your word for it, but it saddens me.  I would hope our automation
could compete with their cheap labor for board assembly.  I pick 1000 part
prices not because I think I'll build that many, but because a successful
project should blow that away.  If it's a good idea, then a thousand should
not be a problem, and I don't mean TRNGs, but projects in general.  I'd
hate to abandon a good idea because I read the 10-piece prices.  There were
some prices with big breaks at 4,000, and I found it hard to resist putting
that in my BOM.  Seriously, how big a dent can we make in the world with
anything smaller than 4,000 units?


> > I built a zener-noise TRNG back in 1998, with reverse Vbe breakdown of a
> > 2N2222, and fed it into a 40MHz 8-bit A/D converter, and used a Lattice
> > FPGA to whiten the output.  The A/D converter was my first ever
> experience
> > with surface mount parts, and I've mostly given up on prototyping since.
> >
> > I would be very happy to work with you on a proof-of-concept built on
> your
> > board.  That would be awesome.
>
> maybe once you have a working prototype?
>

I'll try and take you up on that!

One question: is it better to spend money on a completed surface-mount
board for your prototype, trying to make it as close as possible to a real
production board, or can we still do real prototypes, where we can try
different capacitor values, for example?  Do we simply pay 10X more for
each part to mount them on Proto Advantage surface-mount to DIP?

Sorry I'm effectively a noob again when it comes to building the
prototypes...


> > This was designed for Triad Semiconductor's 0.35u mixed signal ASICs.
> They
> > have capacitor arrays and transistor arrays, and the whole thing is
> > configured with one via layer.  I think the mixed-signal ASIC guys in
> > general would disagree that analog in CMOS is a bad idea... however, it
> is
> > in an analog process.
> >
> > Noise is good.  Power supply noise, shot noise, 1/f noise, thermal noise,
> > and even Mallory's external RF signal injection are all welcome!  They
> all
> > get mashed together and add to entropy, rather than overriding it.
> That's
> > what happens when we amplify with modular multiplication rather than
> > saturating multiplication.
>
> OK a bit of a different process ...
>
> I was more thinking of noise injected synchronously  due to your clock, VDD
> will droop due to pin inductance as everything switches (you might attach
> any
> spare internal caps to VDD if you can)
>

Why?  Injected noise is welcome.  It can only add entropy.  The real
entropy comes from low level noise in the components, but power supply
noise is still entropy worth adding to the pool, even if it is predictable
and low bandwidth.


> > > than the avalanche source, largely because the analog avalanche source
> is
> > > being sampled in the analog domain and getting a perfect sample means
> > > choosing
> > > a sampling point and that likely means hand tweaking resistors in the
> > > manufacturing process - instead we just accept that we get 7.5 bits of
> > > entropy/byte and 'whiten' it through a CRC.
> >
> > That's the right approach, IMO.  Just feed unpredictable state into your
> > entropy pool and generate as much data from it as you need.
>
> and that's the way  the linux kernel works - you just have to feed it data
> that's  random enough to pass it's smoke test (hence the small amount of
> whitening)
>

I am a big Linux fan, though also I have major gripes.  I have an
air-gapped Ubuntu 14.04 machine for building Windows CipherShed releases
(the poorly named fork of TrueCrypt).  Generating keys was a nightmare,
which made me think of this project again.  I just needed a 4096 bit key
pair, and it made me type like a monkey on my keyboard for about half an
hour!


> > > Besides that these designs are not ones one normally builds, after
> years
> > > of building stuff to discourage noise actually making it on purpose,
> and
> > > then
> > > trying to contain it means that you are by definition going to have FCC
> > > issues
> > > - I think you need an RF shield no matter what you do.
> >
> > I agree.  I'll need to keep the EMI where it belongs - on the inside of
> the
> > USB stick.  By the way, while I may need to tweak the design after
> playing
> > with real hardware, the architecture will work.  Here's the unfinished
> list
> > of parts with their cost that I have so far:
> >
> >   Quad analog switch 1.3566 1000 1 1.3566  Quad op-amp 1.8 1000 1 1.8
> > 384-LUT FPGA $1.31 1000 1 $1.31  USB interface IC $1.58 1000 1 $1.58
> .1uF
> > bypass cap 0.0405 1000 1 0.0405  100pF chip cap 0.022 1000 2 0.044  120
> Ohm
> > 5% resistor 0.01566 1000 2 0.03132  Quad 8.2K 5% resistors 0.01568 1000 1
> > 0.01568  Quad 10K 5% resistors 0.01568 1000 1 0.01568
>
> BTW don't forget that to build a real product it also means you have to
> build
> a manufacturing programming and test jig - that's often as much work as
> designing the product itself
>
>         Paul
>

Whoa... who's talking about building a real product ?!? :-)  I'll leave
that to you guys.

Thanks for all the great advice.

Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/discuss/attachments/20140929/c40f848c/attachment.html>


More information about the Discuss mailing list