true random number

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KeYp_290406
Level 4
Level 4
        I have been able to generate a random number sequence by sampling the noise on a line using capsense set to some high sensitivity. It can be foiled by grounding the external line. I'm wondering if there is a noisy internal source on the part that can be sampled that would be more secure. I'm generating a random 32 byte sequence for a security process.   
0 Likes
14 Replies
Anonymous
Not applicable

 You can use a zener diode as a noise genertor

0 Likes
KeYp_290406
Level 4
Level 4
        I was looking for something internal. An external noise source can be grounded making it easy to disable security.   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The problem with sampling internal Vref, like the band gap or Vdd,

   

is that noise has a correlation component to it due to processor

   

activity. How big that is I do not know.

   

 

   

Consider the PRS,  can be up to 64 bits.

   

 

   

Rergards Dana.

   

 

   

0 Likes
Anonymous
Not applicable

Would the PRS good enough?

   

However, if people can physicaly access your equipement, then whether you are using external or internal noise generator may not make much a difference.

0 Likes
KeYp_290406
Level 4
Level 4
        The PRS works great when you need a sequence of randomish numbers. I have used it for lighting control. For security challenges a true random number is what's needed so that every challenge is different making it difficult to mimic.   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I would assume the principal problem you have using A/D

   

is its finite resolution convolves a less than true random

   

result on the sampling of noise. That coupled with thermal

   

noise is not truly random, and noise in a UP environment

   

has non zero correlation, all lead to a pseudo random, not

   

true random result.

   

 

   

You could in verilog make a much larger PRS, say 128 bits,

   

to help. Food for thought.

   

 

   

Regards, Dana.

0 Likes
KeYp_290406
Level 4
Level 4
        I'm generating a random challenge to send to an external part for authentication. The PRS would work, I would just need to keep track of the last PRS index used so that it changes on every power up. I think the PRS generates the same sequence over and over.   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The PRS accepts a "Seed" value from which you may generate different sequences from. When you store the actual seed in an EEProm-location at startup, you can generate a new seed out of it which again you save in EEProm for the next startup.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

In Creator, Start Page, "Find Example Project", there are example

   

projects for EEPROM and Emulated EEPROM (in FLASH), the former

   

has longer erase / write cycle lifetime, 1,000,000 cycles 20 year vs

   

100,000 20 year or less for the latter depending on temp.

   

Regards, Dana.

   

 

   

0 Likes
KeYp_290406
Level 4
Level 4
        Thanks for that info, I use the eeprom often and didn't realize the rewrite was that high.   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You are always welcome!

   

 

   

Look at datasheet for associated specs tied to lifetime, namely temp.

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You could always use the SPC (die temp sensor) to create a psuedo random seed for the PRS.

   


   

The PSoC® 3 devices have an on-chip temperature sensor that is used to measure the internal die temperature. The temperature sensor uses the Delta Vbe method for digital temperature measurement.

   


The temperature sensor block has an auxiliary analog-to-digital converter (ADC) to measure the internal die temperature. The
auxiliary ADC is a 10-bit accurate ADC in the system performance controller (SPC) primarily designed for measuring temper
ature sensor output. It is also possible to route the analog output of diode in temperature sensor block to analog globals to
measure temperature using the higher resolution Delta-Sigma ADC in PSoC 3.

   

 

   

Or use another PRS to create the seed.

   

 

   

Regards, Dana.

0 Likes
KeYp_290406
Level 4
Level 4
        Can the temp sensor be routed to the hi res adc from the schematic input?   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

My error, it is a software only component, so you cannot route

   

die temp sensor to ADC.

   

 

   

Regards, Dana.

0 Likes