Close

Init vectors

A project log for PEAC Pisano with End-Around Carry algorithm

Add X to Y and Y to X, says the song. And carry on.

yann-guidon-ygdesYann Guidon / YGDES 2 days ago0 Comments

Until now I use 0xABCD and 0x4567 to initialise the PEAC16x2 algorithms, but they don't propagate the carries enough. This comes from the fact that even and odd hex digits are "aligned" so there are at least 4 bits that are identical at each position. Ideally : X|Y=1 for each bit position.

One way to solve this is to offset the digits by one position : X=0xBCDE and Y=0x4567

This is slightly better:

>>> hex( 0xABCD | 0x4567 )
'0xefef'
>>> hex( 0xBCDE | 0x4567 )
'0xfdff'

Time to update all the other references...

Discussions