This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jon.Oberheide
Recipients Jon.Oberheide, neologix, pitrou, r.david.murray, sbt, vstinner
Date 2012-04-12.14:18:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334240290.42.0.954061772282.issue14532@psf.upfronthosting.co.za>
In-reply-to
Content
> You could rewrite:
> 
>     result |= x ^ y
> 
> as:
> 
>     result |= (x != y)

You could, but it's best not to introduce any conditional branching based if at all possible. For reference, see:

http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-library/#comment-5783
History
Date User Action Args
2012-04-12 14:18:10Jon.Oberheidesetrecipients: + Jon.Oberheide, pitrou, vstinner, r.david.murray, neologix, sbt
2012-04-12 14:18:10Jon.Oberheidesetmessageid: <1334240290.42.0.954061772282.issue14532@psf.upfronthosting.co.za>
2012-04-12 14:18:09Jon.Oberheidelinkissue14532 messages
2012-04-12 14:18:09Jon.Oberheidecreate