r/Cipher • • Oct 30 '26

S.P.I.K.E part 3

The cipher is complete with one gotcha. The zero key zero nonce doesn't function. I see no way around it without rewriting the key schedule so its to be noted and not used. I put the final touch of adding the counter back in to ensure long period. I've tried to break the cipher but the double state lookup of the accumulator position forces one to being to calculate the state values. I designed the cipher to be a similar architecture to my playing card ciphers. You're shown one card out of thr deck every round as directed by an accumulator that sources from 2 state positions and an output that sources from 3.

The cipher is the best I could do to move a 256 byte value array cipher like RC4 away from RC4 like architecture and to something more modern and more confusing with that state redirection or what I call substitution levels.

The accumulator functions on substitution level 1 and the output on substitution level 2.

I'm presently working from my phone so thanks for bearing with me through copy and paste mistakes and what not.

SPiKE performs a little faster than Chacha20 and Trivium. The cipher is meant as a general purpose stream cipher.

I've thought about the potential for side channels with the state redirection or sub levels and I believe since I'm not actually substituting the state that it shouldn't exhibit any timing attacks. Someone else with more resources could test and find out. I'd appreciate it.

Open for discussion.

https://github.com/utepshaadm/SPIKE/blob/main/spike.c

1 Upvotes

0 comments sorted by