使用Salsa20,如何寻找字节位置(假设它是64的倍数)(使用http://cr.yp.to/snuffle/salsa20/merged/salsa20.c处的公共域C实现
我试过这个,但它不起作用:
void seekIV(unsigned long int pos) {
int low_32bits, high_32bits;
pos /= 64;
low_32bits = pos & 0xffffffff;
high_32bits = (pos >> 32) & 0xffffffff;
printf("\n SEEKING TO %lu\n", pos * 64);
ctx.input[8] = low_32bits;
ctx.input[9] = high_32bits;
}
答案 0 :(得分:0)
D'OH ......答案是......我忘了也在流中找到了;)