BITS=64
p=3900617629
q=2378309513
n=p*q
d=pow(e,-1,(p-1)*(q-1))
e=17
# Encrypt this message
m=0x11bb112233445566
c=pow(m,e,n)
c
blinding_factor=getrandbits(BITS)
blinding_factor
# encrypt blinding factor, since we know e and n
# multiply c by it
new_c=c*pow(blinding_factor,e,n) % n
new_c
# new_c is transmitted to decrypting code/device/server for decryption
decrypted=pow(new_c,d,n)
# device/server still can't deduce the true plaintext!
hex(decrypted)
# restore true plaintext on client side:
hex(decrypted/blinding_factor)