Advertisement
AnthonyCagliano

Untitled

Dec 1st, 2022
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. ; now xor with polynomial if tmp degree too high
  2. ; this means timing analysis will leak polynomial info
  3. ; however, this is a public spec and therefore not
  4. ; implementation-breaking
  5. bit 1, (ix - 4) ; polynomial is 233 bits, check 234th bit
  6. jr z, .no_xor_poly
  7.  
  8. ; xor byte 1 (little-endian encoding)
  9. ld a, (ix - 32 + 1)
  10. xor 2
  11. ld (ix - 32 + 1), a
  12.  
  13. ; xor byte 21 (little endian encoding)
  14. ld a, (ix - 32 + 21)
  15. xor 4
  16. ld (ix - 32 + 21), a
  17.  
  18. ; xor byte 28
  19. ld a, (ix - 32 + 28)
  20. xor 1
  21. ld (ix - 32 + 28), a
  22.  
  23.  
  24.  
  25.  
  26. .no_xor_poly
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement