On Fri, Feb 10, 2017 at 10:50 AM, <piers.powlesl...@yoti.com> wrote: > It seems that all constants above are multiplied by 2^16 to allow the > calculation to be performed with integer arithmetic, before being shifted > back into an 8 bit range. But Y' is multiplied by 0x010100 which is > equivalent to Y' * 2^16 + Y' * 2^8. I can't see why Y' in this case is > scaled differently to the other components of the equation.
Great question! In writing up an explanation, it turns out that multiplying Y' by 0x10101 instead of 0x10100 is more principled. See https://go-review.googlesource.com/36732 for all of the gory details. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.