so for my project I will write a super strong encription system. it will use a private key for the security and it will automatically write the strings and numbers to memory. the security key must not be in the memory coz it could be taken by people. so I will keep it to registers in the centrel processing core. the core has 8 registers and I will only take 2 for the secret key. how tell the compierl to leave my registers. I trhink there must be a pragma to say what it can use but where is it. did they forget it. this is very difficult problem. only answer if you can share me the knowledge and help. if you have code tell me. I will let you know my e mail and you must send it it here. it must be secret don't tell any body.
I expect he stores the crypto key in some external EEPROM, but protected using strong 16-bit encryption and possibly a 5-character one-word english pass phrase. So the program loads and decrypts the crypto key so it then in two 8-bit registers can keep the ultra-safe crypto key used for the real data processing.
well, where does the encryption come from? if "kept in a register" it is lost at power off
How? The guy proposed setting registers to explicit values, which is a particularly safe approach, rather than assuming default values. When "The Fog" completely clears perhaps you can elucidate?
The only really unsafe thing in this thread is assuming that reading the energy states from a register cell is somehow more secure than if it transits some memory bus/buffer.
anyhow, it is still unsafe, but I did manage in my early morning fog to mix up ports and registers, the ports are reset to 0xff the registers are random content till startup.a51 run
Exactly so.
That is one of those defensive programming tips I was taught many moons ago by the master guru of embedded system techniques. The one and only Dr Zeusti.
All hail Dr Zeusti.
So hardly an unsafe assumption, compared to assuming it was some specific number, and that being wrong...
table 1 reset value
I see no mention of R0 to R7 there.
I do see them shown in Figure 3 (in the 128 bytes of RAM section).
I've always considered Registers R0 to R7 to be internal RAM, so they would not be affected by the reset.
At initial power-up, they surely hold an undefined state and therefore they should be initialised accordingly
evidently you have 'always' been dead wrong
www.danlhenry.com/.../80C51_FAM_PROG_GUIDE_1.pdf
Looks like you people don't seem to recognise when your chain is being yanked.
Regardless, according to the Bible, the internal RAM is not affected by a reset.
At initial power-up, they surely hold an undefined state and therefore they should be initialised accordingly.
Next thing - the 8051 has all registers memory-mapped. Exactly why would the memory region where the registers are stored be any more secure than any other RAM available inside the 8051 chip?
..... and the regisers are reset by hardware at power up
A super-strong encryption that can be stored in two registers of an 8-bit 8051 core? So only 16-bit large key? Secure???
And you're using an 8051!? If you want to control register usage, write your code in assembler, the 8051 C compiler is already held together with wax and string.
This is YOUR project, do it YOURSELF!
View all questions in Keil forum