debris / tiny-keccak

An implementation of Keccak derived functions specified in FIPS-202, SP800-185 and KangarooTwelve
Creative Commons Zero v1.0 Universal
193 stars 49 forks source link

[Proposal] const-integer based API #12

Closed rphmeier closed 6 years ago

rphmeier commented 7 years ago

I don't think this should be merged as-is, but it benches just as fast as #11.

Currently uses typenum I'll revisit this when proper dependent typing lands. Then we should just declare

struct Keccak<rate: usize, delim: u8> where rate <= PLEN * 8 and export type Shake128 = ... and so on.