[Cryptech Tech] Common API structure for cores

Paul Selkirk paul at psgd.org
Wed Apr 29 23:06:31 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've been thinking along similar lines, but didn't want to meddle too
much in your cores to do it. Getting the apps to use a common set of
symbolic name was the first step, then we can tweak the underlying
memory map.

For the RNG cores, ctrl is at 0x10 and status is at 0x11, for no
discernible reason. AES puts ctrl at 0x08, but status at 0x0a (0x09
being 2 bits of config, which might be rolled into ctrl). The big
offender is ChaCha, which doesn't have name or version registers, and
puts ctrl at 0x00 and status at 0x01.

The individual ctrl and status bits are somewhat core-dependent, but
should be harmonized where possible.

				paul

On 04/29/2015 10:24 AM, Joachim Strömbergson wrote:
> Aloha!
> 
> Paul: Thanks for great work with the unified HAL. One thing I would
> like to suggest is that we start unifying some of the addresses and
> even bits in the cores. We are almost there, but some cores will
> have to be adjusted, which means update of testbenches and some SW.
> What I'm thinking of is this:
> 
> // addresses and codes common to all cores #define ADDR_NAME0
> 0x00 #define ADDR_NAME1              0x01 #define ADDR_VERSION
> 0x02
> 
> // addresses and codes common to all hash cores #define ADDR_CTRL
> 0x8 #define CTRL_INIT_CMD           1 #define CTRL_NEXT_CMD
> 2 #define ADDR_STATUS             0x9 #define STATUS_READY_BIT
> 1 #define STATUS_VALID_BIT        2 #define ADDR_BLOCK
> 0x10 #define ADDR_DIGEST             0x20      // except SHA512
> 
> 
> The 32+32 bit name and 32 bit version fields are in basically all
> cores at these addresses. The control and status fields are almost
> at the 0x08 and 0x09 addresses in all cores (but not all). What
> happens after STATUS is probably core specific fields. But be able
> to find name, version, control and status in all cores at the same
> place seems to me a fairly easy and worthwile thing to do.
> 
> _______________________________________________ Tech mailing list 
> Tech at cryptech.is https://lists.cryptech.is/listinfo/tech
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVQWP3AAoJELAqzRn9CEWTvmgIAMllrLRreXydQ5BdWTVeNTvd
MAGMC27ytfIUkKZ2xWjvwH+/zbwriEdjHvBvhqYNLXM76QVphlt/SJ2FaFy9O5tb
DN3OkMgG6XHbrndCs4A8Lz2v3JjGGQVot9zQCAKUNrwqvZA+FSOwujbXEkU4wFBt
7F2e49PE3+S4ojXiRcXqrySCn2K1Iqj9OjrMFy4QsnVGQ8CTppOYTZ7nglJCELGf
IfrGDqlovcZDubm1khr/ZEV1c4mqzYog4TEJmxkjISSSWoiT4Hd45Vn5y20SurOg
ja1ZPCbwn5OUZFfYUY9M8/y0q3H91xlHweO9NhwILtGkS16v0Pcj5Axp+Z0gWdI=
=jrhu
-----END PGP SIGNATURE-----


More information about the Tech mailing list