[Cryptech Tech] SHA-3 and Ed25519
Bernd Paysan
bernd at net2o.de
Fri Mar 6 16:50:59 UTC 2015
Am Freitag, 6. März 2015, 17:38:59 schrieb Joachim Strömbergson:
> Bernd Paysan wrote:
> > Am Freitag, 6. März 2015, 02:17:39 schrieb Bernd Paysan:
> >> The synthesis report gives me 5161 LUTs and 1610 registers. 1600
> >> of those LUTs are just to implement the input^state thing, which
> >> seems a bit obsessive to me. If I wouldn't do input^state to
> >> facilitate hashing, but just state <= input, I would use only ~3500
> >> LUTs. Maybe using a direct bus input could remove that overhead;
> >> I'll try tomorrow (so you would have two register addresses writing
> >> to each 32 bit word of the state, one would give you a direct
> >> write, the other an xor).
> >
> > Ok, second version with the bus interface integrated. That's now
> > 4784 LUTs+1610 regs (with a 16 bit bus), and two mappings: The first
> > one is direct write, the second one xor to the state. Write the
> > number of rounds into the last address to get going.
> >
> > The bus is configurable for 16, 32 or 64 bits.
>
> Cool! Thanks.
>
> Do you have a testbench done yet?
I've just thrown it into my b16 project, and used that environment to test it,
actually remotely from the debug command interface.
The code I enter from the command line is that one:
: keccak@ $FC00 pad 100 dbg at s pad 200 ;
pad 200 2dup erase $FC00 dbg!s
s" SX{9" $FC00 dbg!s
$8000 $FC7E dbg!
24 $FDFE dbg! keccak@ dump pad @ hex.
24 $FDFE dbg! keccak@ dump pad @ hex.
24 $FDFE dbg! keccak@ dump pad @ hex.
24 $FDFE dbg! keccak@ dump pad @ hex.
And that's the output (without the dumps)
$466624B803BF072F ok
$993340D7F9153F02 ok
$6EAAAE36BE8E36D3 ok
$1B4AEC08DA6A8BA6 ok
Expected values are
$466624B803BF072F
$993340D7F9153F02
$6EAAAE36BE8E36D3
$1B4AEC08DA6A8BA6
Looks good (and the dumps confirm that the full state is accessible).
I probably want a similar way to access the Novena, then I can do the same
sort of testing with the Novena framework.
--
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/
net2o ID: kQusJzA;7*?t=uy at X}1GWr!+0qqp_Cn176t4(dQ*
More information about the Tech
mailing list