Skip to content

Instantly share code, notes, and snippets.

@romainthomas
Created May 10, 2019 14:35
Show Gist options
  • Save romainthomas/cd69fda9e4df1a2eddf940371819a118 to your computer and use it in GitHub Desktop.
Save romainthomas/cd69fda9e4df1a2eddf940371819a118 to your computer and use it in GitHub Desktop.
Arybo_mba.py
import arybo.lib.mba_exprs as EX
import sys
def f(x):
v0 = ((x & 343337308) ^ 0xFFFFFFFF) & (x | 343337308)
return v0
mba32 = MBA(32)
X = mba32.var('X')
res = f(X)
VD = res.vectorial_decomp([X])
print("Cst = " + hex(VD.cst().get_int_be()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment