Re: AES and dynamic table generation

From: Brian Gladman (brg_at_nowhere.at.all)
Date: 01/12/04


Date: Mon, 12 Jan 2004 14:45:59 -0000


"Tom St Denis" <tomstdenis@iahu.ca> wrote in message
news:0fxMb.110570$AAe1.47673@news01.bloor.is.net.cable.rogers.com...
>
> "Simon G Best" <s.g.best@btopenworld.com> wrote in message
> news:40029237.800@btopenworld.com...
> > Tom St Denis wrote:
> > > "Brian Gladman" <brg@nowhere.at.all> wrote in message
> > > news:nFWKb.19364$qx2.2163603@stones.force9.net...
> > >
> > >>Its very easy to make dynamic tables thread safe and they do have
> > >>significant advantages in some environments.
> > >
> > > In a portable fashion?
> >
> > The OP didn't limit the context of the question he asked to just
> > multithreaded, portable applications.
> >
> > Consider a microcontroller with limited nonvolatile memory, but plenty
> > of RAM. If that's going to be used in an application where the speed of
> > lookup tables is required, dynamic table generation might be the only
> > option!
>
> A microcontroller with little ROM and plenty of RAM? Where do these come
> from? 8051 has 256 bytes of ram [that you'd want to use] and upto 64KB of
> ROM... The 6805 series is similar. RAM is hella more expensive in
fielded
> designs then ROM is.

Such situations do exist. I have even been asked to support situations
where the only memory available is stack based RAM.

> The only real "benefit" of dynamic tables is I can now send you a shorter
> executable. But since the program only has to be stored once [this is AES
> afterall] there's no point in wasting the 10KB [or so] of RAM on tables
that
> could just as easily fit in ROM.

This is not the only benefit since in some situations ROM is much slower
than RAM. Hence it can sometimes pay in speed terms to have the tables in
dynamic memory.

Designing code that can be used in both ordinary and in embedded
environments in harder than you might expect since the latter are much less
predictable in terms of the constraints that they impose.

And, of course, inability to cope with needs that are frequently encountered
in embedded systems is a real constraint on portability :-)

   Brian Gladman



Relevant Pages

  • Re: OTF Encryption? Basic PPC2003 se security questions? (newbie)
    ... > since rom files can be displaced by replacement files. ... This suggests that the loader looks at a "replacement" folder before ... > added programs can be loaded into ram or memory cards, ... > hard reset the device which erases all ram content. ...
    (microsoft.public.pocketpc)
  • Re: Difference between ROM and RAM
    ... to configure their memory the way they want would be good. ... Finally, if you code for a requirement of 128MB of RAM, you'll really limit ... RAM and ROM up until ... I'm programming application for Pocket PC and I'm ...
    (microsoft.public.pocketpc)
  • Re: CP/M-85 ??
    ... The basic answer still stands, 8085 runs CP/M, yes. ... M10x have 32k of rom at 0000. ... That's not an advantagous memory map ... All the extended mapped ram in the world makes only for a ramdisk. ...
    (comp.os.cpm)
  • Re: clientaz.dll
    ... Having my first computer for 2 months now, I don't know much about RAM and ... ROM other than - the more, ... program, I interpret it saying that I need more RAM! ... At the top of the screen it said: RAM Usage 99%, Virtual Memory Usage ...
    (microsoft.public.security.virus)
  • ColdFire M5271 use 52Kb SRAM for C-stack to test DRAM at OS boot ?
    ... allocate C-stack there to test DRAM at the boot time? ... allocating stack on DRAM and jumping over it during DRAM test - anybody ... I need to run the RAM test before the bootrom copies itself into RAM, ... At this point the system is still executing instructions out of ROM. ...
    (comp.arch.embedded)