Skip to content

Instantly share code, notes, and snippets.

View pinxue's full-sized avatar

品雪 pinxue

  • Shanghai
View GitHub Profile
{"sig":"32f779419035545cafbe7179e7be6b2bbc9b018b6f91e28e16f415f703e2faad142bdd4f27fb3b481e582c06e318df588759beadea6011b0cdb840e34e5470ad1","msghash":"59ffcbe29ecc0daeb6d69b1137216f79f5edcbc3474aa250b95faa58a26e5541"}
@pinxue
pinxue / keccak_f1600.c
Created June 3, 2018 19:40
Keccak-f[1600] in plain c
// converted from https://github.com/coruus/keccak-tiny/blob/singlefile/keccak-tiny.c
#define rol(x, s) (((x) << s) | ((x) >> (64 - s)))
/*** Keccak-f[1600] ***/
static inline void keccakf(void* state) {
uint64_t* a = (uint64_t*)state;
uint64_t b[5] = {0};
uint64_t t = 0;
uint8_t x, y;