source 2007 Hisil--Carter--Dawson parameter b assume b = a - 1 compute R0 = S1^2 compute R1 = C1^2 compute R2 = R0^2 compute R3 = R1^2 compute R4 = 2 R3 compute R5 = 2 R4 compute R6 = 2 R1 compute R6 = R6+R0 compute R6 = R6^2 compute R6 = R6-R2 compute R6 = R6-R5 compute R2 = b R2 compute R5 = R5+R4 compute R4 = R2^2 compute R0 = R5 R2 compute R5 = R2 R6 compute R2 = R3^2 compute R1 = R3 R6 compute R3 = R4-R2 compute R2 = R4+R2 compute R4 = 2 R3 compute R3 = b R1 compute R6 = b R5 compute R3 = R0+R3 compute R1 = R1+R2 compute R0 = R0-R6 compute R2 = R5-R2 compute R5 = R3+R4 compute R5 = R5-R1 compute S3 = S1 R5 compute R4 = R4-R2 compute R4 = R4-R0 compute C3 = C1 R4 compute R2 = R2+R3 compute D3 = D1 R2 compute R0 = R0-R1 compute Z3 = Z1 R0